报错信息:
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/dept
我输入的命令是:insert overwrite local directory '/usr/local/hive/datas/dept' select * from dept_partition;
本地没有看到数据,而且最神奇的hdfs上他给我新建了/usr/local/hive/datas/dept目录,但是里边却没有数据文件。

查了一些博客的解决方法都不适合我。
最终发现是权限的问题,我在根目录下新建了一个文件夹,把权限设置为777(即创建者,组用户,其他用户都可读写执行)重新执行命令放到该文件就成功了,不过文件会乱码,使用格式化的命令即可。
insert overwrite local directory '/test /dept' row formatted delimited fields terminated by ‘\t’ select * from dept_partition;


|