HBASE-1758 Extract interface out of HTable; more additions made by Lars Francke
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@887589 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0a09b675d6
commit
1f4de38982
|
@ -63,6 +63,8 @@ public interface HTableInterface {
|
|||
|
||||
/**
|
||||
* Method for getting data from a row.
|
||||
* If the row cannot be found an empty Result is returned.
|
||||
* This can be checked by calling {@link Result#isEmpty()}
|
||||
*
|
||||
* @param get the Get to fetch
|
||||
* @return the result
|
||||
|
@ -152,9 +154,19 @@ public interface HTableInterface {
|
|||
*/
|
||||
void delete(Delete delete) throws IOException;
|
||||
|
||||
/**
|
||||
* Bulk commit a List of Deletes to the table.
|
||||
* @param deletes List of deletes. List is modified by this method.
|
||||
* On exception holds deletes that were NOT applied.
|
||||
* @throws IOException
|
||||
*/
|
||||
void delete(List<Delete> deletes) 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.
|
||||
* and is not a big-endian long, this could throw an exception. If the column
|
||||
* value does not yet exist it is initialized to <code>amount</code> and
|
||||
* written to the specified column.
|
||||
*
|
||||
* @param row
|
||||
* @param family
|
||||
|
@ -166,6 +178,25 @@ public interface HTableInterface {
|
|||
long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier,
|
||||
long amount) 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 <code>amount</code> and
|
||||
* written to the specified column.
|
||||
*
|
||||
* <p>Setting writeToWAL to false means that in a fail scenario, you will lose
|
||||
* any increments that have not been flushed.
|
||||
* @param row
|
||||
* @param family
|
||||
* @param qualifier
|
||||
* @param amount
|
||||
* @param writeToWAL true if increment should be applied to WAL, false if not
|
||||
* @return The new value.
|
||||
* @throws IOException
|
||||
*/
|
||||
long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier,
|
||||
long amount, boolean writeToWAL) throws IOException;
|
||||
|
||||
/**
|
||||
* Get the value of autoFlush. If true, updates will not be buffered.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue