hive導出到本地數據報錯apache
Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to move source hdfs://localhost:9000/tmp/hive/daisy/185ccfc8-52f0-48e4-acd2-866340445241/hive_2020-01-21_11-00-58_110_6359830348207520702-1/-mr-10000 to destination /usr/local/hive/datas/deptoop
我輸入的命令是:insert overwrite local directory '/usr/local/hive/datas/dept' select * from dept_partition;code
本地沒有看到數據,並且最神奇的hdfs上他給我新建了/usr/local/hive/datas/dept目錄,可是裏邊卻沒有數據文件。orm
查了一些博客的解決方法都不適合我。blog
最終發現是權限的問題,我在根目錄下新建了一個文件夾,把權限設置爲777,即建立者,組用戶,其餘用戶均可讀寫執行,從新執行命令放到該文件就成功了,不過文件會亂碼,使用格式化的命令便可。hadoop
insert overwrite local directory '/test /dept' row formatted delimited fields terminated by ‘\t’ select * from dept_partition;博客