accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher <ctubb...@apache.org>
Subject Re: Remove Row Data
Date Fri, 02 May 2014 16:31:19 GMT
I think there's a terminology mismatch in your question. It sounds
like you're trying to remove single entries (Entry = Key/Value pair),
not entire rows. Or, perhaps worded another way, you're trying to
remove specific column families or columns from seom rows. Is that
correct?

To delete an entry, you need to use Mutation.putDelete() to insert a
delete entry for a particular key you wish to remove. Typically you
either know the key you wish to delete already, and can just insert
the corresponding delete entry, or you have to scan to identify
matching entries to delete, and issue deletes for each one that
matches your delete criteria.

The BatchDeleter helps you do the latter
[Connector.createBatchDeleter()]. The BatchDeleter is like a scanner
and a writer combined. You specify the scan criteria (which columns,
ranges, iterators, etc.) to find the entries you wish to delete, and
then you call its delete() method to scan and delete the matching
entries. You can ensure your scan criteria is correct by issuing the
same parameters to a BatchScanner that you would to the BatchDeleter,
and ensuring the returned results are only those entries you wish to
delete, before executing the BatchDeleter.

If you only have a few entries to delete, you can delete them using
the shell, with either the "delete" or "deletemany" command. The
latter takes iterator and column options, just like a scanner. See the
shell's internal help "help <command>" for more details.



--
Christopher L Tubbs II
http://gravatar.com/ctubbsii


On Fri, May 2, 2014 at 9:55 AM, Marko Escriba <escribamarko@gmail.com> wrote:
> Hi,
>
> Is it possible to remove number of rows from a table based from its Column
> Qualifier or Family?
> I have noticed that I can only remove on row, the latest inserted row (based
> on timestamp). In case you want to ask why I need to remove rows, is for the
> reason that I need to revert the failure transaction made by the webapp. Any
> advice on this please.
>
> Thanks.
>
>
>
> --
> View this message in context: http://apache-accumulo.1065345.n5.nabble.com/Remove-Row-Data-tp9573.html
> Sent from the Developers mailing list archive at Nabble.com.

Mime
View raw message