org.apache.hadoop.hbase
Class HClient.BatchHandler

java.lang.Object
  extended by org.apache.hadoop.hbase.HClient.BatchHandler
Enclosing class:
HClient

protected class HClient.BatchHandler
extends Object


Constructor Summary
HClient.BatchHandler()
          constructor
 
Method Summary
 void commit(long timestamp)
          Finalize a batch mutation
 void delete(long lockid, Text column)
          Delete the value for a column
 void put(long lockid, Text column, byte[] value)
          Change the value for the specified column
 long startUpdate(Text row)
          Start a batch row insertion/update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HClient.BatchHandler

public HClient.BatchHandler()
constructor

Method Detail

startUpdate

public long startUpdate(Text row)
Start a batch row insertion/update. Manages multiple batch updates that are targeted for multiple servers, should the rows span several region servers. No changes are committed until the client commits the batch operation via HClient.batchCommit(). The entire batch update can be abandoned by calling HClient.batchAbort(); Callers to this method are given a handle that corresponds to the row being changed. The handle must be supplied on subsequent put or delete calls so that the row can be identified.

Parameters:
row - Name of row to start update against.
Returns:
Row lockid.

put

public void put(long lockid,
                Text column,
                byte[] value)
Change the value for the specified column

Parameters:
lockid - lock id returned from startUpdate
column - column whose value is being set
value - new value for column

delete

public void delete(long lockid,
                   Text column)
Delete the value for a column

Parameters:
lockid - - lock id returned from startUpdate
column - - name of column whose value is to be deleted

commit

public void commit(long timestamp)
            throws IOException
Finalize a batch mutation

Parameters:
timestamp - time to associate with all the changes
Throws:
IOException


Copyright © 2006 The Apache Software Foundation