org.apache.hadoop.hbase.client
Class HTable

java.lang.Object
  extended by org.apache.hadoop.hbase.client.HTable
Direct Known Subclasses:
TransactionalTable

public class HTable
extends Object

Used to communicate with a single HBase table. This class is not thread safe. Use one instance per thread. Puts, deletes, checkAndPut and incrementColumnValue are done in an exclusive (and thus serial) fashion for each row. These calls acquire a row lock which is shared with the lockRow calls. Gets and Scans will not return half written data. That is, all mutation operations are atomic on a row basis with respect to other concurrent readers and writers.


Nested Class Summary
protected  class HTable.ClientScanner
          Implements the scanner interface for the HBase client.
protected  class HTable.OldClientScanner
          Scanner implementation made on top of a ResultScanner.
 
Field Summary
protected  int scannerCaching
           
protected  int scannerTimeout
           
 
Constructor Summary
HTable(byte[] tableName)
          Creates an object to access a HBase table.
HTable(HBaseConfiguration conf, byte[] tableName)
          Creates an object to access a HBase table.
HTable(HBaseConfiguration conf, String tableName)
          Creates an object to access a HBase table.
HTable(String tableName)
          Creates an object to access a HBase table.
 
Method Summary
 boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, byte[] value, Put put)
          Atomically checks if a row/family/qualifier value match the expectedValue.
 boolean checkAndSave(BatchUpdate batchUpdate, HbaseMapWritable<byte[],byte[]> expectedValues, RowLock rl)
          Deprecated. As of hbase 0.20.0, replaced by checkAndPut(byte[], byte[], byte[], byte[], org.apache.hadoop.hbase.client.Put)
 void close()
          Releases any resources help or pending changes in internal buffers.
 void commit(BatchUpdate batchUpdate)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or put(Put)
 void commit(BatchUpdate batchUpdate, RowLock rl)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or put(Put)
 void commit(List<BatchUpdate> batchUpdates)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or put(List)
 void delete(ArrayList<Delete> deletes)
          Deletes the specified cells/rows in bulk.
 void delete(Delete delete)
          Deletes the specified cells/row.
 void deleteAll(byte[] row)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(byte[] row, byte[] column)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(byte[] row, byte[] column, long ts)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(byte[] row, byte[] column, long ts, RowLock rl)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(byte[] row, long ts)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(String row)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(String row, long ts)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(String row, String column)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAll(String row, String column, long ts)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAllByRegex(byte[] row, String colRegex, long ts)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAllByRegex(byte[] row, String colRegex, long ts, RowLock rl)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAllByRegex(String row, String colRegex)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteAllByRegex(String row, String colRegex, long ts)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamily(byte[] row, byte[] family)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamily(byte[] row, byte[] family, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamily(byte[] row, byte[] family, long timestamp, RowLock rl)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamily(String row, String family)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamily(String row, String family, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamilyByRegex(byte[] row, String familyRegex)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamilyByRegex(byte[] row, String familyRegex, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamilyByRegex(byte[] row, String familyRegex, long timestamp, RowLock r1)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamilyByRegex(String row, String familyRegex)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 void deleteFamilyByRegex(String row, String familyRegex, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by delete(Delete)
 boolean exists(byte[] row)
          Deprecated. As of hbase 0.20.0, replaced by exists(Get)
 boolean exists(byte[] row, byte[] column)
          Deprecated. As of hbase 0.20.0, replaced by exists(Get)
 boolean exists(byte[] row, byte[] column, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by exists(Get)
 boolean exists(byte[] row, byte[] column, long timestamp, RowLock rl)
          Deprecated. As of hbase 0.20.0, replaced by exists(Get)
 boolean exists(Get get)
          Test for the existence of columns in the table, as specified in the Get.
 void flushCommits()
          Executes all the buffered Put operations.
 Cell get(byte[] row, byte[] column)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 Cell[] get(byte[] row, byte[] column, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 Cell[] get(byte[] row, byte[] column, long timestamp, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 Result get(Get get)
          Extracts certain cells from a given row.
 Cell get(String row, String column)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 Cell[] get(String row, String column, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 Cell[] get(String row, String column, long timestamp, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getClosestRowBefore(byte[] row, byte[] family)
          Deprecated. As of hbase 0.20.0, replaced by getRowOrBefore(byte[], byte[])
 HConnection getConnection()
          INTERNAL Used by unit tests and tools to do low-level manipulations.
 byte[][] getEndKeys()
          Gets the ending row key for every region in the currently open table.
 HRegionLocation getRegionLocation(byte[] row)
          Finds the region on which the given row is being served.
 HRegionLocation getRegionLocation(String row)
          Find region location hosting passed row using cached info
 Map<HRegionInfo,HServerAddress> getRegionsInfo()
          Gets all the regions and their address for this table.
 RowResult getRow(byte[] row)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(byte[] row, byte[][] columns)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(byte[] row, byte[][] columns, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(byte[] row, byte[][] columns, long ts)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(byte[] row, byte[][] columns, long ts, int numVersions, RowLock rl)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(byte[] row, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(byte[] row, long ts)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(byte[] row, long timestamp, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row, long ts)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row, long ts, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row, String[] columns)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row, String[] columns, int numVersions)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row, String[] columns, long ts)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 RowResult getRow(String row, String[] columns, long timestamp, int numVersions, RowLock rowLock)
          Deprecated. As of hbase 0.20.0, replaced by get(Get)
 Result getRowOrBefore(byte[] row, byte[] family)
          Return the row that matches row exactly, or the one that immediately precedes it.
 ResultScanner getScanner(byte[] family)
          Gets a scanner on the current table for the given family.
 Scanner getScanner(byte[][] columns)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(byte[][] columns, byte[] startRow)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(byte[][] columns, byte[] startRow, byte[] stopRow)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(byte[][] columns, byte[] startRow, byte[] stopRow, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(byte[][] columns, byte[] startRow, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(byte[][] columns, byte[] startRow, long timestamp, RowFilterInterface filter)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(byte[][] columns, byte[] startRow, RowFilterInterface filter)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 ResultScanner getScanner(byte[] family, byte[] qualifier)
          Gets a scanner on the current table for the given family and qualifier.
 ResultScanner getScanner(Scan scan)
          Returns a scanner on the current table as specified by the Scan object.
 Scanner getScanner(String[] columns)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(String[] columns, String startRow)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(String[] columns, String startRow, long timestamp, RowFilterInterface filter)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 Scanner getScanner(String[] columns, String startRow, String stopRow, long timestamp)
          Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)
 int getScannerCaching()
          Gets the number of rows that a scanner will fetch at once.
 Pair<byte[][],byte[][]> getStartEndKeys()
          Gets the starting and ending row keys for every region in the currently open table.
 byte[][] getStartKeys()
          Gets the starting row key for every region in the currently open table.
 HTableDescriptor getTableDescriptor()
          Gets the table descriptor for this table.
 byte[] getTableName()
          Gets the name of this table.
 ArrayList<Put> getWriteBuffer()
          Get the write buffer
 long getWriteBufferSize()
          Get the maximum size in bytes of the write buffer for this HTable
 long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount)
          Atomically increments a column value.
 long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier, long amount, boolean writeToWAL)
          Atomically increments a column value.
 boolean isAutoFlush()
          Tells whether or not 'auto-flush' is turned on.
static boolean isTableEnabled(byte[] tableName)
          Tells whether or not a table is enabled or not.
static boolean isTableEnabled(HBaseConfiguration conf, byte[] tableName)
          Tells whether or not a table is enabled or not.
static boolean isTableEnabled(HBaseConfiguration conf, String tableName)
          Tells whether or not a table is enabled or not.
static boolean isTableEnabled(String tableName)
          Tells whether or not a table is enabled or not.
 RowLock lockRow(byte[] row)
          Obtains a lock on a row.
 void put(List<Put> puts)
          Puts some data in the table, in batch.
 void put(Put put)
          Puts some data in the table.
 void setAutoFlush(boolean autoFlush)
          Turns on or off 'auto-flush' on this instance.
 void setScannerCaching(int scannerCaching)
          Sets the number of rows that a scanner will fetch at once.
 void setWriteBufferSize(long writeBufferSize)
          Set the size of the buffer in bytes.
 void unlockRow(RowLock rl)
          Releases a row lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scannerTimeout

protected final int scannerTimeout

scannerCaching

protected int scannerCaching
Constructor Detail

HTable

public HTable(String tableName)
       throws IOException
Creates an object to access a HBase table.

Parameters:
tableName - Name of the table.
Throws:
IOException - if a remote or network exception occurs

HTable

public HTable(byte[] tableName)
       throws IOException
Creates an object to access a HBase table.

Parameters:
tableName - Name of the table.
Throws:
IOException - if a remote or network exception occurs

HTable

public HTable(HBaseConfiguration conf,
              String tableName)
       throws IOException
Creates an object to access a HBase table.

Parameters:
conf - Configuration object to use.
tableName - Name of the table.
Throws:
IOException - if a remote or network exception occurs

HTable

public HTable(HBaseConfiguration conf,
              byte[] tableName)
       throws IOException
Creates an object to access a HBase table.

Parameters:
conf - Configuration object to use.
tableName - Name of the table.
Throws:
IOException - if a remote or network exception occurs
Method Detail

isTableEnabled

public static boolean isTableEnabled(String tableName)
                              throws IOException
Tells whether or not a table is enabled or not.

Parameters:
tableName - Name of table to check.
Returns:
true if table is online.
Throws:
IOException - if a remote or network exception occurs

isTableEnabled

public static boolean isTableEnabled(byte[] tableName)
                              throws IOException
Tells whether or not a table is enabled or not.

Parameters:
tableName - Name of table to check.
Returns:
true if table is online.
Throws:
IOException - if a remote or network exception occurs

isTableEnabled

public static boolean isTableEnabled(HBaseConfiguration conf,
                                     String tableName)
                              throws IOException
Tells whether or not a table is enabled or not.

Parameters:
conf - The Configuration object to use.
tableName - Name of table to check.
Returns:
true if table is online.
Throws:
IOException - if a remote or network exception occurs

isTableEnabled

public static boolean isTableEnabled(HBaseConfiguration conf,
                                     byte[] tableName)
                              throws IOException
Tells whether or not a table is enabled or not.

Parameters:
conf - The Configuration object to use.
tableName - Name of table to check.
Returns:
true if table is online.
Throws:
IOException - if a remote or network exception occurs

getRegionLocation

public HRegionLocation getRegionLocation(String row)
                                  throws IOException
Find region location hosting passed row using cached info

Parameters:
row - Row to find.
Returns:
The location of the given row.
Throws:
IOException - if a remote or network exception occurs

getRegionLocation

public HRegionLocation getRegionLocation(byte[] row)
                                  throws IOException
Finds the region on which the given row is being served.

Parameters:
row - Row to find.
Returns:
Location of the row.
Throws:
IOException - if a remote or network exception occurs

getTableName

public byte[] getTableName()
Gets the name of this table.

Returns:
the table name.

getConnection

public HConnection getConnection()
INTERNAL Used by unit tests and tools to do low-level manipulations.

Returns:
An HConnection instance.

getScannerCaching

public int getScannerCaching()
Gets the number of rows that a scanner will fetch at once.

The default value comes from hbase.client.scanner.caching.


setScannerCaching

public void setScannerCaching(int scannerCaching)
Sets the number of rows that a scanner will fetch at once.

This will override the value specified by hbase.client.scanner.caching. Increasing this value will reduce the amount of work needed each time next() is called on a scanner, at the expense of memory use (since more rows will need to be maintained in memory by the scanners).

Parameters:
scannerCaching - the number of rows a scanner will fetch at once.

getTableDescriptor

public HTableDescriptor getTableDescriptor()
                                    throws IOException
Gets the table descriptor for this table.

Throws:
IOException - if a remote or network exception occurs.

getStartKeys

public byte[][] getStartKeys()
                      throws IOException
Gets the starting row key for every region in the currently open table.

This is mainly useful for the MapReduce integration.

Returns:
Array of region starting row keys
Throws:
IOException - if a remote or network exception occurs

getEndKeys

public byte[][] getEndKeys()
                    throws IOException
Gets the ending row key for every region in the currently open table.

This is mainly useful for the MapReduce integration.

Returns:
Array of region ending row keys
Throws:
IOException - if a remote or network exception occurs

getStartEndKeys

public Pair<byte[][],byte[][]> getStartEndKeys()
                                        throws IOException
Gets the starting and ending row keys for every region in the currently open table.

This is mainly useful for the MapReduce integration.

Returns:
Pair of arrays of region starting and ending row keys
Throws:
IOException - if a remote or network exception occurs

getRegionsInfo

public Map<HRegionInfo,HServerAddress> getRegionsInfo()
                                               throws IOException
Gets all the regions and their address for this table.

This is mainly useful for the MapReduce integration.

Returns:
A map of HRegionInfo with it's server address
Throws:
IOException - if a remote or network exception occurs

getRowOrBefore

public Result getRowOrBefore(byte[] row,
                             byte[] family)
                      throws IOException
Return the row that matches row exactly, or the one that immediately precedes it.

Parameters:
row - A row key.
family - Column family to include in the Result.
Throws:
IOException - if a remote or network exception occurs.
Since:
0.20.0

getClosestRowBefore

public RowResult getClosestRowBefore(byte[] row,
                                     byte[] family)
                              throws IOException
Deprecated. As of hbase 0.20.0, replaced by getRowOrBefore(byte[], byte[])

Return the row that matches row exactly, or the one that immediately preceeds it.

Parameters:
row - row key
family - Column family to look for row in.
Returns:
map of values
Throws:
IOException

getScanner

public ResultScanner getScanner(Scan scan)
                         throws IOException
Returns a scanner on the current table as specified by the Scan object.

Parameters:
scan - A configured Scan object.
Returns:
A scanner.
Throws:
IOException - if a remote or network exception occurs.
Since:
0.20.0

getScanner

public ResultScanner getScanner(byte[] family)
                         throws IOException
Gets a scanner on the current table for the given family.

Parameters:
family - The column family to scan.
Returns:
A scanner.
Throws:
IOException - if a remote or network exception occurs.
Since:
0.20.0

getScanner

public ResultScanner getScanner(byte[] family,
                                byte[] qualifier)
                         throws IOException
Gets a scanner on the current table for the given family and qualifier.

Parameters:
family - The column family to scan.
qualifier - The column qualifier to scan.
Returns:
A scanner.
Throws:
IOException - if a remote or network exception occurs.
Since:
0.20.0

get

public Result get(Get get)
           throws IOException
Extracts certain cells from a given row.

Parameters:
get - The object that specifies what data to fetch and from which row.
Returns:
The data coming from the specified row, if it exists. If the row specified doesn't exist, the Result instance returned won't contain any KeyValue, as indicated by Result.isEmpty().
Throws:
IOException - if a remote or network exception occurs.
Since:
0.20.0

delete

public void delete(Delete delete)
            throws IOException
Deletes the specified cells/row.

Parameters:
delete - The object that specifies what to delete.
Throws:
IOException - if a remote or network exception occurs.
Since:
0.20.0

delete

public void delete(ArrayList<Delete> deletes)
            throws IOException
Deletes the specified cells/rows in bulk.

Parameters:
deletes - List of things to delete. List gets modified by this method (in particular it gets re-ordered, so the order in which the elements are inserted in the list gives no guarantee as to the order in which the Deletes are executed).
Throws:
IOException - if a remote or network exception occurs. In that case the deletes argument will contain the Delete instances that have not be successfully applied.
Since:
0.20.1

put

public void put(Put put)
         throws IOException
Puts some data in the table.

If isAutoFlush is false, the update is buffered until the internal buffer is full.

Parameters:
put - The data to put.
Throws:
IOException - if a remote or network exception occurs.
Since:
0.20.0

put

public void put(List<Put> puts)
         throws IOException
Puts some data in the table, in batch.

If isAutoFlush is false, the update is buffered until the internal buffer is full.

Parameters:
puts - The list of mutations to apply. The list gets modified by this method (in particular it gets re-ordered, so the order in which the elements are inserted in the list gives no guarantee as to the order in which the Puts are executed).
Throws:
IOException - if a remote or network exception occurs. In that case the puts argument will contain the Put instances that have not be successfully applied.
Since:
0.20.0

incrementColumnValue

public long incrementColumnValue(byte[] row,
                                 byte[] family,
                                 byte[] qualifier,
                                 long amount)
                          throws IOException
Atomically increments a column value.

Equivalent to {@link #incrementColumnValue(byte[], byte[], byte[], long, boolean) incrementColumnValue}(row, family, qualifier, amount, <b>true</b>)

Parameters:
row - The row that contains the cell to increment.
family - The column family of the cell to increment.
qualifier - The column qualifier of the cell to increment.
amount - The amount to increment the cell with (or decrement, if the amount is negative).
Returns:
The new value, post increment.
Throws:
IOException - if a remote or network exception occurs.

incrementColumnValue

public long incrementColumnValue(byte[] row,
                                 byte[] family,
                                 byte[] qualifier,
                                 long amount,
                                 boolean writeToWAL)
                          throws IOException
Atomically increments a column value. If the column value already exists and is not a big-endian long, this could throw an exception. If the column value does not yet exist it is initialized to amount and written to the specified column.

Setting writeToWAL to false means that in a fail scenario, you will lose any increments that have not been flushed.

Parameters:
row - The row that contains the cell to increment.
family - The column family of the cell to increment.
qualifier - The column qualifier of the cell to increment.
amount - The amount to increment the cell with (or decrement, if the amount is negative).
writeToWAL - if true, the operation will be applied to the Write Ahead Log (WAL). This makes the operation slower but safer, as if the call returns successfully, it is guaranteed that the increment will be safely persisted. When set to false, the call may return successfully before the increment is safely persisted, so it's possible that the increment be lost in the event of a failure happening before the operation gets persisted.
Returns:
The new value, post increment.
Throws:
IOException - if a remote or network exception occurs.

checkAndPut

public boolean checkAndPut(byte[] row,
                           byte[] family,
                           byte[] qualifier,
                           byte[] value,
                           Put put)
                    throws IOException
Atomically checks if a row/family/qualifier value match the expectedValue. If it does, it adds the put.

Parameters:
row -
family -
qualifier -
value - the expected value
put -
Returns:
true if the new put was execute, false otherwise
Throws:
IOException

exists

public boolean exists(Get get)
               throws IOException
Test for the existence of columns in the table, as specified in the Get.

This will return true if the Get matches one or more keys, false if not.

This is a server-side call so it prevents any data from being transfered to the client.

Parameters:
get -
Returns:
true if the specified Get matches one or more keys, false if not
Throws:
IOException

flushCommits

public void flushCommits()
                  throws IOException
Executes all the buffered Put operations.

This method gets called once automatically for every Put or batch of Puts (when #put(List) is used) when isAutoFlush() is true.

Throws:
IOException - if a remote or network exception occurs.

close

public void close()
           throws IOException
Releases any resources help or pending changes in internal buffers.

Throws:
IOException - if a remote or network exception occurs.

lockRow

public RowLock lockRow(byte[] row)
                throws IOException
Obtains a lock on a row.

Parameters:
row - The row to lock.
Returns:
A RowLock containing the row and lock id.
Throws:
IOException - if a remote or network exception occurs.
See Also:
RowLock, unlockRow(org.apache.hadoop.hbase.client.RowLock)

unlockRow

public void unlockRow(RowLock rl)
               throws IOException
Releases a row lock.

Parameters:
rl - The row lock to release.
Throws:
IOException - if a remote or network exception occurs.
See Also:
RowLock, lockRow(byte[])

isAutoFlush

public boolean isAutoFlush()
Tells whether or not 'auto-flush' is turned on.

Returns:
true if 'auto-flush' is enabled (default), meaning Put operations don't get buffered/delayed and are immediately executed.
See Also:
setAutoFlush(boolean)

setAutoFlush

public void setAutoFlush(boolean autoFlush)
Turns on or off 'auto-flush' on this instance.

Parameters:
autoFlush - Whether or not to use 'auto-flush'.
See Also:
isAutoFlush()

getWriteBufferSize

public long getWriteBufferSize()
Get the maximum size in bytes of the write buffer for this HTable

Returns:
the size of the write buffer in bytes

setWriteBufferSize

public void setWriteBufferSize(long writeBufferSize)
                        throws IOException
Set the size of the buffer in bytes. If the new size is lower than the current size of data in the write buffer, the buffer is flushed.

Parameters:
writeBufferSize -
Throws:
IOException

getWriteBuffer

public ArrayList<Put> getWriteBuffer()
Get the write buffer

Returns:
the current write buffer

get

public Cell get(String row,
                String column)
         throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get a single value for the specified row and column

Parameters:
row - row key
column - column name
Returns:
value for specified row/column
Throws:
IOException

get

public Cell[] get(String row,
                  String column,
                  int numVersions)
           throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get a single value for the specified row and column

Parameters:
row - row key
column - column name
numVersions - - number of versions to retrieve
Returns:
value for specified row/column
Throws:
IOException

get

public Cell get(byte[] row,
                byte[] column)
         throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get a single value for the specified row and column

Parameters:
row - row key
column - column name
Returns:
value for specified row/column
Throws:
IOException

get

public Cell[] get(byte[] row,
                  byte[] column,
                  int numVersions)
           throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get the specified number of versions of the specified row and column

Parameters:
row - row key
column - column name
numVersions - number of versions to retrieve
Returns:
Array of Cells.
Throws:
IOException

get

public Cell[] get(String row,
                  String column,
                  long timestamp,
                  int numVersions)
           throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get the specified number of versions of the specified row and column with the specified timestamp.

Parameters:
row - - row key
column - - column name
timestamp - - timestamp
numVersions - - number of versions to retrieve
Returns:
- array of values that match the above criteria
Throws:
IOException

get

public Cell[] get(byte[] row,
                  byte[] column,
                  long timestamp,
                  int numVersions)
           throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get the specified number of versions of the specified row and column with the specified timestamp.

Parameters:
row - - row key
column - - column name
timestamp - - timestamp
numVersions - - number of versions to retrieve
Returns:
- array of values that match the above criteria
Throws:
IOException

getRow

public RowResult getRow(String row)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get all the data for the specified row at the latest timestamp

Parameters:
row - row key
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get all the data for the specified row at the latest timestamp

Parameters:
row - row key
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(String row,
                        int numVersions)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get more than one version of all columns for the specified row

Parameters:
row - row key
numVersions - number of versions to return
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row,
                        int numVersions)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get more than one version of all columns for the specified row

Parameters:
row - row key
numVersions - number of versions to return
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(String row,
                        long ts)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get all the data for the specified row at a specified timestamp

Parameters:
row - row key
ts - timestamp
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row,
                        long ts)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get all the data for the specified row at a specified timestamp

Parameters:
row - row key
ts - timestamp
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(String row,
                        long ts,
                        int numVersions)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get more than one version of all columns for the specified row at a specified timestamp

Parameters:
row - row key
ts - timestamp
numVersions - number of versions to return
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row,
                        long timestamp,
                        int numVersions)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get more than one version of all columns for the specified row at a specified timestamp

Parameters:
row - row key
timestamp - timestamp
numVersions - number of versions to return
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(String row,
                        String[] columns)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get selected columns for the specified row at the latest timestamp

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row,
                        byte[][] columns)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get selected columns for the specified row at the latest timestamp

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(String row,
                        String[] columns,
                        int numVersions)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get more than one version of selected columns for the specified row

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
numVersions - number of versions to return
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row,
                        byte[][] columns,
                        int numVersions)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get more than one version of selected columns for the specified row

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
numVersions - number of versions to return
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(String row,
                        String[] columns,
                        long ts)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get selected columns for the specified row at a specified timestamp

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
ts - timestamp
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row,
                        byte[][] columns,
                        long ts)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get selected columns for the specified row at a specified timestamp

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
ts - timestamp
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(String row,
                        String[] columns,
                        long timestamp,
                        int numVersions,
                        RowLock rowLock)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get more than one version of selected columns for the specified row, using an existing row lock.

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
numVersions - number of versions to return
rowLock - previously acquired row lock
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getRow

public RowResult getRow(byte[] row,
                        byte[][] columns,
                        long ts,
                        int numVersions,
                        RowLock rl)
                 throws IOException
Deprecated. As of hbase 0.20.0, replaced by get(Get)

Get selected columns for the specified row at a specified timestamp using existing row lock.

Parameters:
row - row key
columns - Array of column names and families you want to retrieve.
ts - timestamp
numVersions -
rl - row lock
Returns:
RowResult is null if row does not exist.
Throws:
IOException

getScanner

public Scanner getScanner(String[] columns)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at first row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(String[] columns,
                          String startRow)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(byte[][] columns)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at first row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(byte[][] columns,
                          byte[] startRow)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(byte[][] columns,
                          byte[] startRow,
                          long timestamp)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
timestamp - only return results whose timestamp <= this value
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(byte[][] columns,
                          byte[] startRow,
                          RowFilterInterface filter)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
filter - a row filter using row-key regexp and/or column data filter.
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(byte[][] columns,
                          byte[] startRow,
                          byte[] stopRow)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row and ending just before stopRow. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
stopRow - Row to stop scanning on. Once we hit this row we stop returning values; i.e. we return the row before this one but not the stopRow itself.
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(String[] columns,
                          String startRow,
                          String stopRow,
                          long timestamp)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row and ending just before stopRow. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
stopRow - Row to stop scanning on. Once we hit this row we stop returning values; i.e. we return the row before this one but not the stopRow itself.
timestamp - only return results whose timestamp <= this value
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(byte[][] columns,
                          byte[] startRow,
                          byte[] stopRow,
                          long timestamp)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row and ending just before stopRow. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
stopRow - Row to stop scanning on. Once we hit this row we stop returning values; i.e. we return the row before this one but not the stopRow itself.
timestamp - only return results whose timestamp <= this value
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(String[] columns,
                          String startRow,
                          long timestamp,
                          RowFilterInterface filter)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
timestamp - only return results whose timestamp <= this value
filter - a row filter using row-key regexp and/or column data filter.
Returns:
scanner
Throws:
IOException

getScanner

public Scanner getScanner(byte[][] columns,
                          byte[] startRow,
                          long timestamp,
                          RowFilterInterface filter)
                   throws IOException
Deprecated. As of hbase 0.20.0, replaced by getScanner(Scan)

Get a scanner on the current table starting at the specified row. Return the specified columns.

Parameters:
columns - columns to scan. If column name is a column family, all columns of the specified column family are returned. Its also possible to pass a regex in the column qualifier. A column qualifier is judged to be a regex if it contains at least one of the following characters: \+|^&*$[]]}{)(.
startRow - starting row in table to scan
timestamp - only return results whose timestamp <= this value
filter - a row filter using row-key regexp and/or column data filter.
Returns:
scanner
Throws:
IOException

deleteAll

public void deleteAll(byte[] row)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Completely delete the row's cells.

Parameters:
row - Key of the row you want to completely delete.
Throws:
IOException

deleteAll

public void deleteAll(String row)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Completely delete the row's cells.

Parameters:
row - Key of the row you want to completely delete.
Throws:
IOException

deleteAll

public void deleteAll(byte[] row,
                      byte[] column)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Completely delete the row's cells.

Parameters:
row - Key of the row you want to completely delete.
column - column to be deleted
Throws:
IOException

deleteAll

public void deleteAll(byte[] row,
                      long ts)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Completely delete the row's cells.

Parameters:
row - Key of the row you want to completely delete.
ts - Delete all cells of the same timestamp or older.
Throws:
IOException

deleteAll

public void deleteAll(String row,
                      long ts)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Completely delete the row's cells.

Parameters:
row - Key of the row you want to completely delete.
ts - Delete all cells of the same timestamp or older.
Throws:
IOException

deleteAll

public void deleteAll(String row,
                      String column)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column.

Parameters:
row - Row to update
column - name of column whose value is to be deleted
Throws:
IOException

deleteAll

public void deleteAll(String row,
                      String column,
                      long ts)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp.

Parameters:
row - Row to update
column - name of column whose value is to be deleted
ts - Delete all cells of the same timestamp or older.
Throws:
IOException

deleteAll

public void deleteAll(byte[] row,
                      byte[] column,
                      long ts)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp.

Parameters:
row - Row to update
column - name of column whose value is to be deleted
ts - Delete all cells of the same timestamp or older.
Throws:
IOException

deleteAll

public void deleteAll(byte[] row,
                      byte[] column,
                      long ts,
                      RowLock rl)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp, using an existing row lock.

Parameters:
row - Row to update
column - name of column whose value is to be deleted
ts - Delete all cells of the same timestamp or older.
rl - Existing row lock
Throws:
IOException

deleteAllByRegex

public void deleteAllByRegex(String row,
                             String colRegex)
                      throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column.

Parameters:
row - Row to update
colRegex - column regex expression
Throws:
IOException

deleteAllByRegex

public void deleteAllByRegex(String row,
                             String colRegex,
                             long ts)
                      throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp.

Parameters:
row - Row to update
colRegex - Column Regex expression
ts - Delete all cells of the same timestamp or older.
Throws:
IOException

deleteAllByRegex

public void deleteAllByRegex(byte[] row,
                             String colRegex,
                             long ts)
                      throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp.

Parameters:
row - Row to update
colRegex - Column Regex expression
ts - Delete all cells of the same timestamp or older.
Throws:
IOException

deleteAllByRegex

public void deleteAllByRegex(byte[] row,
                             String colRegex,
                             long ts,
                             RowLock rl)
                      throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp, using an existing row lock.

Parameters:
row - Row to update
colRegex - Column regex expression
ts - Delete all cells of the same timestamp or older.
rl - Existing row lock
Throws:
IOException

deleteFamily

public void deleteFamily(String row,
                         String family)
                  throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family at all timestamps.

Parameters:
row - The row to operate on
family - The column family to match
Throws:
IOException

deleteFamily

public void deleteFamily(byte[] row,
                         byte[] family)
                  throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family at all timestamps.

Parameters:
row - The row to operate on
family - The column family to match
Throws:
IOException

deleteFamily

public void deleteFamily(String row,
                         String family,
                         long timestamp)
                  throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family with timestamps less than or equal to timestamp.

Parameters:
row - The row to operate on
family - The column family to match
timestamp - Timestamp to match
Throws:
IOException

deleteFamily

public void deleteFamily(byte[] row,
                         byte[] family,
                         long timestamp)
                  throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family with timestamps less than or equal to timestamp.

Parameters:
row - The row to operate on
family - The column family to match
timestamp - Timestamp to match
Throws:
IOException

deleteFamily

public void deleteFamily(byte[] row,
                         byte[] family,
                         long timestamp,
                         RowLock rl)
                  throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family with timestamps less than or equal to timestamp, using existing row lock.

Parameters:
row - The row to operate on
family - The column family to match
timestamp - Timestamp to match
rl - Existing row lock
Throws:
IOException

deleteFamilyByRegex

public void deleteFamilyByRegex(String row,
                                String familyRegex)
                         throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family regex at all timestamps.

Parameters:
row - The row to operate on
familyRegex - Column family regex
Throws:
IOException

deleteFamilyByRegex

public void deleteFamilyByRegex(byte[] row,
                                String familyRegex)
                         throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family regex at all timestamps.

Parameters:
row - The row to operate on
familyRegex - Column family regex
Throws:
IOException

deleteFamilyByRegex

public void deleteFamilyByRegex(String row,
                                String familyRegex,
                                long timestamp)
                         throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family regex with timestamps less than or equal to timestamp.

Parameters:
row - The row to operate on
familyRegex - Column family regex
timestamp - Timestamp to match
Throws:
IOException

deleteFamilyByRegex

public void deleteFamilyByRegex(byte[] row,
                                String familyRegex,
                                long timestamp)
                         throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family regex with timestamps less than or equal to timestamp.

Parameters:
row - The row to operate on
familyRegex - Column family regex
timestamp - Timestamp to match
Throws:
IOException

deleteFamilyByRegex

public void deleteFamilyByRegex(byte[] row,
                                String familyRegex,
                                long timestamp,
                                RowLock r1)
                         throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete)

Delete all cells for a row with matching column family regex with timestamps less than or equal to timestamp, using existing row lock.

Parameters:
row - The row to operate on
familyRegex - Column Family Regex
timestamp - Timestamp to match
r1 - Existing row lock
Throws:
IOException

exists

public boolean exists(byte[] row)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by exists(Get)

Test for the existence of a row in the table.

Parameters:
row - The row
Returns:
true if the row exists, false otherwise
Throws:
IOException

exists

public boolean exists(byte[] row,
                      byte[] column)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by exists(Get)

Test for the existence of a row and column in the table.

Parameters:
row - The row
column - The column
Returns:
true if the row exists, false otherwise
Throws:
IOException

exists

public boolean exists(byte[] row,
                      byte[] column,
                      long timestamp)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by exists(Get)

Test for the existence of a coordinate in the table.

Parameters:
row - The row
column - The column
timestamp - The timestamp
Returns:
true if the specified coordinate exists
Throws:
IOException

exists

public boolean exists(byte[] row,
                      byte[] column,
                      long timestamp,
                      RowLock rl)
               throws IOException
Deprecated. As of hbase 0.20.0, replaced by exists(Get)

Test for the existence of a coordinate in the table.

Parameters:
row - The row
column - The column
timestamp - The timestamp
rl - Existing row lock
Returns:
true if the specified coordinate exists
Throws:
IOException

commit

public void commit(BatchUpdate batchUpdate)
            throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or put(Put)

Commit a BatchUpdate to the table. If autoFlush is false, the update is buffered

Parameters:
batchUpdate -
Throws:
IOException

commit

public void commit(BatchUpdate batchUpdate,
                   RowLock rl)
            throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or put(Put)

Commit a BatchUpdate to the table using existing row lock. If autoFlush is false, the update is buffered

Parameters:
batchUpdate -
rl - Existing row lock
Throws:
IOException

commit

public void commit(List<BatchUpdate> batchUpdates)
            throws IOException
Deprecated. As of hbase 0.20.0, replaced by delete(Delete) or put(List)

Commit a List of BatchUpdate to the table. If autoFlush is false, the updates are buffered

Parameters:
batchUpdates -
Throws:
IOException

checkAndSave

public boolean checkAndSave(BatchUpdate batchUpdate,
                            HbaseMapWritable<byte[],byte[]> expectedValues,
                            RowLock rl)
                     throws IOException
Deprecated. As of hbase 0.20.0, replaced by checkAndPut(byte[], byte[], byte[], byte[], org.apache.hadoop.hbase.client.Put)

Atomically checks if a row's values match the expectedValues. If it does, it uses the batchUpdate to update the row.

This operation is not currently supported, use checkAndPut(byte[], byte[], byte[], byte[], org.apache.hadoop.hbase.client.Put)

Parameters:
batchUpdate - batchupdate to apply if check is successful
expectedValues - values to check
rl - rowlock
Throws:
IOException


Copyright © 2010 The Apache Software Foundation