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.
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.
Yes you're right Christopher. Im sorry for the mistake. What I am really trying to do here is to remove rows that belongs to the same Column Family/Qualifier. I have not read the Mutation.putDelete and createBatchDeleter from the api docs. Thank you for the reference. I am just confused to where to put the criteria (columns/ranges) on createBatchDeleter config though.