hive insert overwrite仅仅覆盖生成的文件,并不会覆盖目录

介绍

hadoop fs -ls /mytest/warehouse/mytable/

Found 4 items
-rwxrwxrwx 3 myvm users 1163 2016-11-24 03:11 /mytest/warehouse/mytable/000000_0
-rwxrwxrwx 3 myvm users 0 2016-11-24 03:09 /mytest/warehouse/mytable/000000_1
-rwxrwxrwx 3 myvm users 0 2016-11-24 03:09 /mytest/warehouse/mytable/000000_2
-rwxrwxrwx 3 myvm users 0 2016-11-24 03:09 /mytest/warehouse/mytable/000000_3

当执行

insert overwrite directory "/mytest/warehouse/mytable" select * from my_table

上面命令仅仅覆盖它生成的文件,例如,仅仅生成000000_0文件,那么仅仅会覆盖这个文件,其他文件还会存在。

你可能感兴趣的:(Hive)