hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvraju <tvvr...@gmail.com>
Subject PreBatchMutate - Delete another row inside this method
Date Mon, 24 Nov 2014 20:31:49 GMT
IN PreBatchMutate method in Observer, I am trying to check whether a row ,
say '123', exists and delete the row.  This row is different from the
current row , say '111' ,in the method, which has locked the current row.
But Delete operation is waiting for the lock to '111' instead of '123'.

Say,  I have a table - test_delete, cf:delete_row
I have two rows 1) '123','defaultRow' 2) '111','111'

I will try to re-insert the second row with '111','123'. IN PreBatchMutate
method, I am trying to check if row '123' exists and delete it.

Result result = c.getEnvironment().getRegion().get(new
                                byte[] deleteRow = result.getRow();
                                logger.debug(String.format("Deleting row
:%s", Bytes.toString(deleteRow)));
                                Delete delete = new Delete(deleteRow);

Exception :

org.apache.hadoop.hbase.regionserver.HRegion: Failed getting lock in batch
put, row=111
java.io.IOException: Timed out waiting for lock for row: 111

Please advice.

View this message in context: http://apache-hbase.679495.n3.nabble.com/PreBatchMutate-Delete-another-row-inside-this-method-tp4066298.html
Sent from the HBase User mailing list archive at Nabble.com.

View raw message