问题
I am attempting to insert into a table by selecting from another:
INSERT OVERWRITE TABLE testtable1 select * from testtable0
The error:
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
Is the -r suggestion and the -skipTrash option to be added to the hive query? What should the syntax be, or is there a better way to do this query?
回答1:
Can you share the location you are pointing to when you create testtable1?
It seems like your testtable is pointing to the root container in your WASB storage account. Hive works on a folder level and not a file level. Since you do not provide a sub-directory for the table data to be stored in, it tries to delete the entire data in your container which contains the trash folder.
Simply add a sub-folder when you are creating your testtable and that should fix the problem.
来源:https://stackoverflow.com/questions/30577083/insert-overwrite-cannot-move-to-the-trash-as-it-contains-the-trash