public class ThriftHBaseServiceHandler extends Object implements THBaseService.Iface
| Modifier and Type | Method and Description |
|---|---|
TResult |
append(ByteBuffer table,
TAppend append) |
boolean |
checkAndDelete(ByteBuffer table,
ByteBuffer row,
ByteBuffer family,
ByteBuffer qualifier,
ByteBuffer value,
TDelete deleteSingle)
Atomically checks if a row/family/qualifier value matches the expected
value.
|
boolean |
checkAndPut(ByteBuffer table,
ByteBuffer row,
ByteBuffer family,
ByteBuffer qualifier,
ByteBuffer value,
TPut put)
Atomically checks if a row/family/qualifier value matches the expected
value.
|
void |
closeScanner(int scannerId)
Closes the scanner.
|
List<TDelete> |
deleteMultiple(ByteBuffer table,
List<TDelete> deletes)
Bulk commit a List of TDeletes to the table.
|
void |
deleteSingle(ByteBuffer table,
TDelete deleteSingle)
Deletes as specified by the TDelete.
|
boolean |
exists(ByteBuffer table,
TGet get)
Test for the existence of columns in the table, as specified in the TGet.
|
TResult |
get(ByteBuffer table,
TGet get)
Method for getting data from a row.
|
List<TResult> |
getMultiple(ByteBuffer table,
List<TGet> gets)
Method for getting multiple rows.
|
List<TResult> |
getScannerResults(ByteBuffer table,
TScan scan,
int numRows)
Get results for the provided TScan object.
|
List<TResult> |
getScannerRows(int scannerId,
int numRows)
Grabs multiple rows from a Scanner.
|
TResult |
increment(ByteBuffer table,
TIncrement increment) |
void |
mutateRow(ByteBuffer table,
TRowMutations rowMutations)
mutateRow performs multiple mutations atomically on a single row.
|
static THBaseService.Iface |
newInstance(THBaseService.Iface handler,
ThriftMetrics metrics) |
int |
openScanner(ByteBuffer table,
TScan scan)
Get a Scanner for the provided TScan object.
|
void |
put(ByteBuffer table,
TPut put)
Commit a TPut to a table.
|
void |
putMultiple(ByteBuffer table,
List<TPut> puts)
Commit a List of Puts to the table.
|
protected ResultScanner |
removeScanner(int id)
Removes the scanner associated with the specified ID from the internal HashMap.
|
public static THBaseService.Iface newInstance(THBaseService.Iface handler, ThriftMetrics metrics)
protected ResultScanner removeScanner(int id)
id - of the Scanner to removenull if the Id is invalidpublic boolean exists(ByteBuffer table, TGet get) throws TIOError, TException
THBaseService.Ifaceexists in interface THBaseService.Ifacetable - the table to check onget - the TGet to check forTIOErrorTExceptionpublic TResult get(ByteBuffer table, TGet get) throws TIOError, TException
THBaseService.Ifaceget in interface THBaseService.Ifacetable - the table to get fromget - the TGet to fetchTIOErrorTExceptionpublic List<TResult> getMultiple(ByteBuffer table, List<TGet> gets) throws TIOError, TException
THBaseService.IfacegetMultiple in interface THBaseService.Ifacetable - the table to get fromgets - a list of TGets to fetch, the Result list
will have the Results at corresponding positions
or null if there was an errorTIOErrorTExceptionpublic void put(ByteBuffer table, TPut put) throws TIOError, TException
THBaseService.Ifaceput in interface THBaseService.Ifacetable - the table to put data input - the TPut to putTIOErrorTExceptionpublic boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TPut put) throws TIOError, TException
THBaseService.IfacecheckAndPut in interface THBaseService.Ifacetable - to check in and put torow - row to checkfamily - column family to checkqualifier - column qualifier to checkvalue - the expected value, if not provided the
check is for the non-existence of the
column in questionput - the TPut to put if the check succeedsTIOErrorTExceptionpublic void putMultiple(ByteBuffer table, List<TPut> puts) throws TIOError, TException
THBaseService.IfaceputMultiple in interface THBaseService.Ifacetable - the table to put data inputs - a list of TPuts to commitTIOErrorTExceptionpublic void deleteSingle(ByteBuffer table, TDelete deleteSingle) throws TIOError, TException
THBaseService.IfacedeleteSingle in interface THBaseService.Ifacetable - the table to delete fromdeleteSingle - the TDelete to deleteTIOErrorTExceptionpublic List<TDelete> deleteMultiple(ByteBuffer table, List<TDelete> deletes) throws TIOError, TException
THBaseService.IfacedeleteMultiple in interface THBaseService.Ifacetable - the table to delete fromdeletes - list of TDeletes to deleteTIOErrorTExceptionpublic boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, TDelete deleteSingle) throws TIOError, TException
THBaseService.IfacecheckAndDelete in interface THBaseService.Ifacetable - to check in and delete fromrow - row to checkfamily - column family to checkqualifier - column qualifier to checkvalue - the expected value, if not provided the
check is for the non-existence of the
column in questiondeleteSingle - the TDelete to execute if the check succeedsTIOErrorTExceptionpublic TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException
increment in interface THBaseService.IfaceTIOErrorTExceptionpublic TResult append(ByteBuffer table, TAppend append) throws TIOError, TException
append in interface THBaseService.IfaceTIOErrorTExceptionpublic int openScanner(ByteBuffer table, TScan scan) throws TIOError, TException
THBaseService.IfaceopenScanner in interface THBaseService.Ifacetable - the table to get the Scanner forscan - the scan object to get a Scanner forTIOErrorTExceptionpublic List<TResult> getScannerRows(int scannerId, int numRows) throws TIOError, TIllegalArgument, TException
THBaseService.IfacegetScannerRows in interface THBaseService.IfacescannerId - the Id of the Scanner to return rows from. This is an Id returned from the openScanner function.numRows - number of rows to returnTIOErrorTIllegalArgumentTExceptionpublic List<TResult> getScannerResults(ByteBuffer table, TScan scan, int numRows) throws TIOError, TException
THBaseService.IfacegetScannerResults in interface THBaseService.Ifacetable - the table to get the Scanner forscan - the scan object to get a Scanner fornumRows - number of rows to returnTIOErrorTExceptionpublic void closeScanner(int scannerId)
throws TIOError,
TIllegalArgument,
TException
THBaseService.IfacecloseScanner in interface THBaseService.IfacescannerId - the Id of the Scanner to close *TIOErrorTIllegalArgumentTExceptionpublic void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException
THBaseService.IfacemutateRow in interface THBaseService.Ifacetable - table to apply the mutationsrowMutations - mutations to applyTIOErrorTException