You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by "Taylor, Ronald C" <ro...@pnl.gov> on 2009/04/09 00:10:03 UTC
What's the best way to clear an Hbase table?
Hi,
New question: I just tried clearing a table, going row by row, using
deleteAll(rowID) on each row. This works, but takes a really long amount
of time when used on ~250,000 rows (at least in pseudo-distributed
mode, running on just one desktop). Also, while it appears to work fine,
this method generates a huge amount of text in the Hadoop datanode log
file - something approaching 100 Meg across the 250,000 rows deleted.
Is there a better / faster way to clear a table? Or should I "clear" a
table simply by disabling it, deleting it, and then using createTable()
again with the original column settings?
Ron
Re: What's the best way to clear an Hbase table?
Posted by Lars George <la...@worldlingo.com>.
Hi Ron,
Just as a note, the shell's "truncate" call does exactly that, i.e.
dropping and recreating the table.
Regards,
Lars
Taylor, Ronald C wrote:
>
> Yep, that will work. I was just checking out the various ways of doing
> things.
> Ron
>
> -----Original Message-----
> From: saint.ack@gmail.com [mailto:saint.ack@gmail.com] On Behalf Of
> stack
> Sent: Wednesday, April 08, 2009 3:32 PM
> To: hbase-user@hadoop.apache.org
> Subject: Re: What's the best way to clear an Hbase table?
>
> On Thu, Apr 9, 2009 at 12:10 AM, Taylor, Ronald C
> <ro...@pnl.gov>wrote:
>
>
>> Is there a better / faster way to clear a table? Or should I "clear" a
>>
>
>
>> table simply by disabling it, deleting it, and then using
>> createTable() again with the original column settings?
>>
>>
>
> I'd suggest doing the latter. Will that work for you?
> St.Ack
>
>
RE: What's the best way to clear an Hbase table?
Posted by "Taylor, Ronald C" <ro...@pnl.gov>.
Yep, that will work. I was just checking out the various ways of doing
things.
Ron
-----Original Message-----
From: saint.ack@gmail.com [mailto:saint.ack@gmail.com] On Behalf Of
stack
Sent: Wednesday, April 08, 2009 3:32 PM
To: hbase-user@hadoop.apache.org
Subject: Re: What's the best way to clear an Hbase table?
On Thu, Apr 9, 2009 at 12:10 AM, Taylor, Ronald C
<ro...@pnl.gov>wrote:
>
> Is there a better / faster way to clear a table? Or should I "clear" a
> table simply by disabling it, deleting it, and then using
> createTable() again with the original column settings?
>
I'd suggest doing the latter. Will that work for you?
St.Ack
Re: What's the best way to clear an Hbase table?
Posted by stack <st...@duboce.net>.
On Thu, Apr 9, 2009 at 12:10 AM, Taylor, Ronald C <ro...@pnl.gov>wrote:
>
> Is there a better / faster way to clear a table? Or should I "clear" a
> table simply by disabling it, deleting it, and then using createTable()
> again with the original column settings?
>
I'd suggest doing the latter. Will that work for you?
St.Ack