Examples of lockRow()


Examples of org.apache.hadoop.hbase.client.HTable.lockRow()

    HTable table = new HTable(conf, "testtable");

    // vv RowLockExample
    System.out.println("Taking out lock...");
    RowLock lock = table.lockRow(ROW1); // co RowLockExample-3-Lock Lock the entire row.
    System.out.println("Lock ID: " + lock.getLockId());

    Thread thread = new Thread(new UnlockedPut()); // co RowLockExample-4-Start Start the asynchronous thread, which will block.
    thread.start();
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.lockRow()

       byte[] row = randomRowKey();
       Put put = new Put(row);
       put.add(cf, row, row);
       hTable.put(put);

       RowLock lock = hTable.lockRow(row);
       lock.getLockId();
       hTable.unlockRow(lock);

       assertMetricsUpdated(OpType.PUT, OpType.LOCKROW, OpType.UNLOCKROW);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.