Search code examples
hivehiveqlimpala

Dropped impala tables should go to current users trash instead of impala


How can I tweak impala settings so that dropped tables should go to /user/$USER/.Trash instead of /user/impala/.Trash ?


Solution

  • You can't do it just by changing settings.

    Impala delegates "drop table" command to hive metastore. Hive uses hadoop's UGI information to get the trash path. So if you want to change the trash location, you need to start hdfs or hive metastore(not sure if both are needed) with user $USER, then all dropped tables will go to its trash can.