Hive JDBC執行load時無法從本地加載數據


通過hive-jdcv連接hive server,在應用服務端執行以下命令,報錯:Hiver Server節點上找不到data.txt

load data local inpath '/home/dw_hbkas/przhang/data.txt' overwrite into table ind01acom

原因如下:

When using the JDBC driver, the command executes on the HiveServer2 side. The file is evaluated to locally exist on the server, which is not true in your case (it exists on the local client program machine).
Try instead to load the file to HDFS first, and use a HDFS URI in the LOAD DATA statement to make the server find it.

通過JDBC使用load命令時,hive會從hive server節點上找文件,應用服務跟hive server不是一個節點。

解決方法:
load之前文件上傳到hdfs上,從hdfs導入


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM