hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmdevelopment <bmdevelopm...@gmail.com>
Subject Delete row by key is not working
Date Fri, 23 Sep 2011 18:42:31 GMT
Hello,

Currently experiencing the following problem with Deletes.
Attempted on both 0.20.6 and 0.90.4.

Trying to delete a row by using its row key. This is *not* working:

            ArrayList<Delete> toBeDeleted = new ArrayList<Delete>();
            for(Result res: scanner)
            {
                toBeDeleted.add(new Delete(res.getRow()));
            }
            table.delete(toBeDeleted);

However, deleting each cell individually does work and the row is deleted:

            for(Result res: scanner)
            {
                byte[] row = res.getRow();
                KeyValue[] kv = res.raw();
                for(int j=0; j<kv.length; j++)
                {
                    Delete del = new Delete(row);
                    del.deleteColumn(kv[j].getFamily(),
kv[j].getQualifier(), kv[j].getTimestamp());
                    table.delete(del);
                }
            }

Behavior is the same from HBase shell:

# delete row by deleting each cell works fine
> delete 't1', 'r1', 'c1', ts
> delete 't1', 'r1', 'c2', ts
> delete 't1', 'r1', 'c3', ts
...

# delete row by row key does *not* work
> deleteall 't1', 'r1'

This problem is only occuring for a particular table with a particular
row key format,
meaning deleteall is working for generic test cases, other tables with
other row keys, etc.
The format of the row key is just a long, followed by and int: [long][int]

Am I missing something really simple here?

Thanks for the help in advance!
J

Mime
View raw message