You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by Tiffany Reid <tr...@eoir.com> on 2014/04/14 21:13:24 UTC

How to delete all rows in Accumulo table?

Hi,

How do I delete all rows in a table via Accumulo Shell?

Thanks,
Tiffany




Re: How to delete all rows in Accumulo table?

Posted by Mike Drob <ma...@cloudera.com>.
All commands are from memory, so typos might exist. Deleting all rows can
be a very lengthy operation. It will likely be much faster to delete the
table and create a new one.

> droptable foo
> createtable foo

If you had configuration settings on the table that you wanted to keep,
then it might be easier to create, delete, and rename.

> createtable temp -cs foo -cc foo
> droptable foo
> renametable temp foo

If you really need to delete all the rows, you can do it using

> deleterows -t foo -f



On Mon, Apr 14, 2014 at 3:13 PM, Tiffany Reid <tr...@eoir.com> wrote:

> Hi,
>
>
>
> How do I delete all rows in a table via Accumulo Shell?
>
>
>
> Thanks,
>
> Tiffany
>
>
>
>
>

Re: How to delete all rows in Accumulo table?

Posted by Sean Busbey <bu...@cloudera.com>.
You can do this is the shell with:


$> deleterows -f -t myTable

Where "myTable" is the name of your table. Be careful with this, as the
"-f" effectively means "I really know what I'm doing."

You could also just delete the table and recreate it.


On Mon, Apr 14, 2014 at 12:13 PM, Tiffany Reid <tr...@eoir.com> wrote:

> Hi,
>
>
>
> How do I delete all rows in a table via Accumulo Shell?
>
>
>
> Thanks,
>
> Tiffany
>
>
>
>
>



-- 
Sean

Re: How to delete all rows in Accumulo table?

Posted by Eric Newton <er...@gmail.com>.
You can get the splits (into a file) and restore them (from a file).

I can give you one use-case where you wish to lose your splits.
Consider indexing information based on the current date.  And you want
to remove old data.  That is, you will never put old data back into
those old splits.  It makes sense to remove the rows, and the splits
associated with them.

deleterows is a sledgehammer.  It is not a fine tool for removing a
few stray elements.  Its a way of efficiently removing a month of data
from your 13 months of records that is (partially) indexed on month.

-Eric

On Mon, Apr 14, 2014 at 8:50 PM, Arshak Navruzyan <ar...@gmail.com> wrote:
> BTW, I noticed that with
>
> deleterows -t foo -f
>
> you lose your split points.  Not sure why this is desirable behavior in the
> code.
>
>
> On Mon, Apr 14, 2014 at 12:53 PM, Tiffany Reid <tr...@eoir.com> wrote:
>>
>> Thanks so much for all responses.
>>
>> Tiffany
>>
>> On Apr 14, 2014, at 3:24 PM, "Keith Turner" <ke...@deenlo.com> wrote:
>>
>> deletemany pulls data back to the client and write deletes back.   The
>> deleterows command is more efficient, it preforms operations on the server
>> side.  Entire tablets that fall within the range are just dropped.
>>
>>
>>
>>
>> On Mon, Apr 14, 2014 at 3:20 PM, Russ Weeks <rw...@newbrightidea.com>
>> wrote:
>>>
>>> deletemany -t <table> -f
>>>
>>> If you have a large table, that command will produce a lot of output. I
>>> don't know if there's a way to make it less verbose? Maybe best to pipe it
>>> to /dev/null.
>>>
>>> -Russ
>>>
>>>
>>> On Mon, Apr 14, 2014 at 12:13 PM, Tiffany Reid <tr...@eoir.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> How do I delete all rows in a table via Accumulo Shell?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Tiffany
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>

Re: How to delete all rows in Accumulo table?

Posted by Billie Rinaldi <bi...@gmail.com>.
In many use cases, the key distribution changes over time. If the row
portion of the key is itself time-based, deleterows provides the most most
efficient method of removing old data while also keeping you from having a
bunch of empty tablets.
On Apr 14, 2014 8:51 PM, "Arshak Navruzyan" <ar...@gmail.com> wrote:

> BTW, I noticed that with
>
> deleterows -t foo -f
>
> you lose your split points.  Not sure why this is desirable behavior in
> the code.
>
>
> On Mon, Apr 14, 2014 at 12:53 PM, Tiffany Reid <tr...@eoir.com> wrote:
>
>> Thanks so much for all responses.
>>
>> Tiffany
>>
>> On Apr 14, 2014, at 3:24 PM, "Keith Turner" <ke...@deenlo.com> wrote:
>>
>> deletemany pulls data back to the client and write deletes back.   The
>> deleterows command is more efficient, it preforms operations on the server
>> side.  Entire tablets that fall within the range are just dropped.
>>
>>
>>
>>
>> On Mon, Apr 14, 2014 at 3:20 PM, Russ Weeks <rw...@newbrightidea.com>wrote:
>>
>>> deletemany -t <table> -f
>>>
>>> If you have a large table, that command will produce a lot of output. I
>>> don't know if there's a way to make it less verbose? Maybe best to pipe it
>>> to /dev/null.
>>>
>>> -Russ
>>>
>>>
>>> On Mon, Apr 14, 2014 at 12:13 PM, Tiffany Reid <tr...@eoir.com> wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> How do I delete all rows in a table via Accumulo Shell?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Tiffany
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>

Re: How to delete all rows in Accumulo table?

Posted by Arshak Navruzyan <ar...@gmail.com>.
BTW, I noticed that with

deleterows -t foo -f

you lose your split points.  Not sure why this is desirable behavior in the
code.


On Mon, Apr 14, 2014 at 12:53 PM, Tiffany Reid <tr...@eoir.com> wrote:

> Thanks so much for all responses.
>
> Tiffany
>
> On Apr 14, 2014, at 3:24 PM, "Keith Turner" <ke...@deenlo.com> wrote:
>
> deletemany pulls data back to the client and write deletes back.   The
> deleterows command is more efficient, it preforms operations on the server
> side.  Entire tablets that fall within the range are just dropped.
>
>
>
>
> On Mon, Apr 14, 2014 at 3:20 PM, Russ Weeks <rw...@newbrightidea.com>wrote:
>
>> deletemany -t <table> -f
>>
>> If you have a large table, that command will produce a lot of output. I
>> don't know if there's a way to make it less verbose? Maybe best to pipe it
>> to /dev/null.
>>
>> -Russ
>>
>>
>> On Mon, Apr 14, 2014 at 12:13 PM, Tiffany Reid <tr...@eoir.com> wrote:
>>
>>> Hi,
>>>
>>>
>>>
>>> How do I delete all rows in a table via Accumulo Shell?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Tiffany
>>>
>>>
>>>
>>>
>>>
>>
>>
>

Re: How to delete all rows in Accumulo table?

Posted by Tiffany Reid <tr...@eoir.com>.
Thanks so much for all responses.

Tiffany

On Apr 14, 2014, at 3:24 PM, "Keith Turner" <ke...@deenlo.com>> wrote:

deletemany pulls data back to the client and write deletes back.   The deleterows command is more efficient, it preforms operations on the server side.  Entire tablets that fall within the range are just dropped.




On Mon, Apr 14, 2014 at 3:20 PM, Russ Weeks <rw...@newbrightidea.com>> wrote:
deletemany -t <table> -f

If you have a large table, that command will produce a lot of output. I don't know if there's a way to make it less verbose? Maybe best to pipe it to /dev/null.

-Russ


On Mon, Apr 14, 2014 at 12:13 PM, Tiffany Reid <tr...@eoir.com>> wrote:
Hi,

How do I delete all rows in a table via Accumulo Shell?

Thanks,
Tiffany






Re: How to delete all rows in Accumulo table?

Posted by Keith Turner <ke...@deenlo.com>.
deletemany pulls data back to the client and write deletes back.   The
deleterows command is more efficient, it preforms operations on the server
side.  Entire tablets that fall within the range are just dropped.




On Mon, Apr 14, 2014 at 3:20 PM, Russ Weeks <rw...@newbrightidea.com>wrote:

> deletemany -t <table> -f
>
> If you have a large table, that command will produce a lot of output. I
> don't know if there's a way to make it less verbose? Maybe best to pipe it
> to /dev/null.
>
> -Russ
>
>
> On Mon, Apr 14, 2014 at 12:13 PM, Tiffany Reid <tr...@eoir.com> wrote:
>
>> Hi,
>>
>>
>>
>> How do I delete all rows in a table via Accumulo Shell?
>>
>>
>>
>> Thanks,
>>
>> Tiffany
>>
>>
>>
>>
>>
>
>

Re: How to delete all rows in Accumulo table?

Posted by Russ Weeks <rw...@newbrightidea.com>.
deletemany -t <table> -f

If you have a large table, that command will produce a lot of output. I
don't know if there's a way to make it less verbose? Maybe best to pipe it
to /dev/null.

-Russ


On Mon, Apr 14, 2014 at 12:13 PM, Tiffany Reid <tr...@eoir.com> wrote:

> Hi,
>
>
>
> How do I delete all rows in a table via Accumulo Shell?
>
>
>
> Thanks,
>
> Tiffany
>
>
>
>
>