Insert Overwrite: Cannot move ... to the trash, as it contains the 垃圾

Insert Overwrite: Cannot move ... to the trash, as it contains the trash

我正在尝试通过从另一个选择中插入 table:

INSERT OVERWRITE TABLE testtable1 select * from testtable0

错误:

Moving data to: wasb://{container}@{storage}.blob.core.windows.net/hive/scratch/hive_2015-06-01_15-05-14_062_6478651325775395196-1/-ext-10000
Loading data to table default.testtable1
rmr: DEPRECATED: Please use 'rm -r' instead.
rmr: Cannot move "wasb://{container}@{storage}.blob.core.windows.net/" to the trash, as it contains the trash. Consider using -skipTrash option
Failed with exception null

是否要将-r 建议和-skipTrash 选项添加到配置单元查询中?语法应该是什么,或者是否有更好的方法来执行此查询?

能否分享一下您在创建测试table1 时指向的位置?

您的测试table 似乎指向您的 WASB 存储帐户中的根容器。 Hive 在文件夹级别而不是文件级别工作。由于您没有为要存储的 table 数据提供子目录,它会尝试删除包含垃圾文件夹的容器中的全部数据。

在创建测试时只需添加一个子文件夹table,这应该可以解决问题。