You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by "Periya.Data" <pe...@gmail.com> on 2012/12/24 08:46:44 UTC

Drop table skiptrash?

Hi,
   Is there a way to drop a table such that the contents do not go to the
.Trash dir? I have limited diskQuota in hadoop and am running large Hive
jobs in sequence. I would like to drop tables as and when they become
unnecessary and also they must not end up in .Trash..as they occupy lot of
space.

Before I begin my Hive job, I do clean out  (hadoop fs -rmr -skipTrash
...). I would like to know if there something like this to add in my hql
file.

Thanks,
PD.

Re: Drop table skiptrash?

Posted by Nitin Pawar <ni...@gmail.com>.
option1:
set fs.trash.interval=0;

option2:
hadoop dfs -rmr --skipTrash <datapath>
drop table


On Mon, Dec 24, 2012 at 1:16 PM, Periya.Data <pe...@gmail.com> wrote:

> Hi,
>    Is there a way to drop a table such that the contents do not go to the
> .Trash dir? I have limited diskQuota in hadoop and am running large Hive
> jobs in sequence. I would like to drop tables as and when they become
> unnecessary and also they must not end up in .Trash..as they occupy lot of
> space.
>
> Before I begin my Hive job, I do clean out  (hadoop fs -rmr -skipTrash
> ...). I would like to know if there something like this to add in my hql
> file.
>
> Thanks,
> PD.
>
>
>


-- 
Nitin Pawar

Re: Drop table skiptrash?

Posted by Edward Capriolo <ed...@gmail.com>.
Well in hive you can set hadoop variables so you can use the set command to
explicitly disable trash on the client

set x=y

If that does not work it is possible to run dfs commands from hive. Just do
your normal hadoop dfs command without specifying hadoop.

hive > dfs -rmr /user/hive/warehouse

On Mon, Dec 24, 2012 at 2:46 AM, Periya.Data <pe...@gmail.com> wrote:

> Hi,
>    Is there a way to drop a table such that the contents do not go to the
> .Trash dir? I have limited diskQuota in hadoop and am running large Hive
> jobs in sequence. I would like to drop tables as and when they become
> unnecessary and also they must not end up in .Trash..as they occupy lot of
> space.
>
> Before I begin my Hive job, I do clean out  (hadoop fs -rmr -skipTrash
> ...). I would like to know if there something like this to add in my hql
> file.
>
> Thanks,
> PD.
>
>
>