@InterfaceAudience.Private public class ThriftHBaseServiceHandler extends HBaseServiceHandler implements org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
Modifier and Type | Class and Description |
---|---|
static class |
ThriftHBaseServiceHandler.IOErrorWithCause |
protected static class |
ThriftHBaseServiceHandler.ResultScannerWrapper |
Modifier and Type | Field and Description |
---|---|
(package private) IncrementCoalescer |
coalescer |
static int |
HREGION_VERSION |
private static org.slf4j.Logger |
LOG |
private int |
nextScannerId |
private org.apache.hbase.thirdparty.com.google.common.cache.Cache<Integer,ThriftHBaseServiceHandler.ResultScannerWrapper> |
scannerMap |
CLEANUP_INTERVAL, conf, connectionCache, MAX_IDLETIME, metrics
Modifier | Constructor and Description |
---|---|
protected |
ThriftHBaseServiceHandler(org.apache.hadoop.conf.Configuration c,
UserProvider userProvider) |
Modifier and Type | Method and Description |
---|---|
private static void |
addAttributes(OperationWithAttributes op,
Map<ByteBuffer,ByteBuffer> attributes)
Adds all the attributes into the Operation object
|
protected int |
addScanner(ResultScanner scanner,
boolean sortColumns)
Assigns a unique ID to the scanner and adds the mapping to an internal hash-map.
|
List<org.apache.hadoop.hbase.thrift.generated.TCell> |
append(org.apache.hadoop.hbase.thrift.generated.TAppend tappend)
Appends values to one or more columns within a single row.
|
protected long |
atomicIncrement(ByteBuffer tableName,
ByteBuffer row,
byte[] family,
byte[] qualifier,
long amount) |
long |
atomicIncrement(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
long amount)
Atomically increment the column value specified.
|
boolean |
checkAndPut(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
ByteBuffer value,
org.apache.hadoop.hbase.thrift.generated.Mutation mput,
Map<ByteBuffer,ByteBuffer> attributes)
Atomically checks if a row/family/qualifier value matches the expected
value.
|
private void |
closeTable(Table table) |
void |
compact(ByteBuffer tableNameOrRegionName) |
void |
createTable(ByteBuffer in_tableName,
List<org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor> columnFamilies)
Create a table with the specified column families.
|
void |
deleteAll(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
Map<ByteBuffer,ByteBuffer> attributes)
Delete all cells that match the passed row and column.
|
void |
deleteAllRow(ByteBuffer tableName,
ByteBuffer row,
Map<ByteBuffer,ByteBuffer> attributes)
Completely delete the row's cells.
|
void |
deleteAllRowTs(ByteBuffer tableName,
ByteBuffer row,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Completely delete the row's cells marked with a timestamp
equal-to or older than the passed timestamp.
|
void |
deleteAllTs(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Delete all cells that match the passed row and column and whose
timestamp is equal-to or older than the passed timestamp.
|
void |
deleteTable(ByteBuffer in_tableName)
Deletes a table
|
void |
disableTable(ByteBuffer tableName)
Disables a table (takes it off-line) If it is being served, the master
will tell the servers to stop serving it.
|
void |
enableTable(ByteBuffer tableName)
Brings a table on-line (enables it)
|
protected List<org.apache.hadoop.hbase.thrift.generated.TCell> |
get(ByteBuffer tableName,
ByteBuffer row,
byte[] family,
byte[] qualifier,
Map<ByteBuffer,ByteBuffer> attributes)
Note: this internal interface is slightly different from public APIs in regard to handling of
the qualifier.
|
List<org.apache.hadoop.hbase.thrift.generated.TCell> |
get(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
Map<ByteBuffer,ByteBuffer> attributes)
Get a single TCell for the specified table, row, and column at the
latest timestamp.
|
(package private) byte[][] |
getAllColumns(Table table)
Returns a list of all the column families for a given Table.
|
String |
getClusterId()
Returns the cluster ID for this cluster.
|
Map<ByteBuffer,org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor> |
getColumnDescriptors(ByteBuffer tableName)
List all the column families assoicated with a table.
|
private static org.apache.hadoop.hbase.thrift.generated.IOError |
getIOError(Throwable throwable) |
org.apache.hadoop.hbase.thrift.generated.TRegionInfo |
getRegionInfo(ByteBuffer searchRow)
Get the regininfo for the specified row.
|
private Result |
getReverseScanResult(byte[] tableName,
byte[] row,
byte[] family) |
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRow(ByteBuffer tableName,
ByteBuffer row,
Map<ByteBuffer,ByteBuffer> attributes)
Get all the data for the specified table and row at the latest
timestamp.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRows(ByteBuffer tableName,
List<ByteBuffer> rows,
Map<ByteBuffer,ByteBuffer> attributes)
Get all the data for the specified table and rows at the latest
timestamp.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRowsTs(ByteBuffer tableName,
List<ByteBuffer> rows,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Get all the data for the specified table and rows at the specified
timestamp.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRowsWithColumns(ByteBuffer tableName,
List<ByteBuffer> rows,
List<ByteBuffer> columns,
Map<ByteBuffer,ByteBuffer> attributes)
Get the specified columns for the specified table and rows at the latest
timestamp.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRowsWithColumnsTs(ByteBuffer tableName,
List<ByteBuffer> rows,
List<ByteBuffer> columns,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Get the specified columns for the specified table and rows at the specified
timestamp.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRowTs(ByteBuffer tableName,
ByteBuffer row,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Get all the data for the specified table and row at the specified
timestamp.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRowWithColumns(ByteBuffer tableName,
ByteBuffer row,
List<ByteBuffer> columns,
Map<ByteBuffer,ByteBuffer> attributes)
Get the specified columns for the specified table and row at the latest
timestamp.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
getRowWithColumnsTs(ByteBuffer tableName,
ByteBuffer row,
List<ByteBuffer> columns,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Get the specified columns for the specified table and row at the specified
timestamp.
|
private ThriftHBaseServiceHandler.ResultScannerWrapper |
getScanner(int id)
Returns the scanner associated with the specified ID.
|
private static TableName |
getTableName(ByteBuffer buffer) |
List<ByteBuffer> |
getTableNames()
List all the userspace tables.
|
Map<ByteBuffer,Boolean> |
getTableNamesWithIsTableEnabled()
List all the userspace tables and their enabled or disabled flags.
|
List<org.apache.hadoop.hbase.thrift.generated.TRegionInfo> |
getTableRegions(ByteBuffer tableName)
Returns the list of regions in the given table, or an empty list if the table does not exist
|
org.apache.hadoop.hbase.thrift.generated.TThriftServerType |
getThriftServerType()
Get the type of this thrift server.
|
List<org.apache.hadoop.hbase.thrift.generated.TCell> |
getVer(ByteBuffer tableName,
ByteBuffer row,
byte[] family,
byte[] qualifier,
int numVersions,
Map<ByteBuffer,ByteBuffer> attributes)
Note: this public interface is slightly different from public Java APIs in regard to handling
of the qualifier.
|
List<org.apache.hadoop.hbase.thrift.generated.TCell> |
getVer(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
int numVersions,
Map<ByteBuffer,ByteBuffer> attributes)
Get the specified number of versions for the specified table,
row, and column.
|
protected List<org.apache.hadoop.hbase.thrift.generated.TCell> |
getVerTs(ByteBuffer tableName,
ByteBuffer row,
byte[] family,
byte[] qualifier,
long timestamp,
int numVersions,
Map<ByteBuffer,ByteBuffer> attributes)
Note: this internal interface is slightly different from public APIs in regard to handling of
the qualifier.
|
List<org.apache.hadoop.hbase.thrift.generated.TCell> |
getVerTs(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
long timestamp,
int numVersions,
Map<ByteBuffer,ByteBuffer> attributes)
Get the specified number of versions for the specified table,
row, and column.
|
void |
increment(org.apache.hadoop.hbase.thrift.generated.TIncrement tincrement)
Increment a cell by the ammount.
|
void |
incrementRows(List<org.apache.hadoop.hbase.thrift.generated.TIncrement> tincrements) |
boolean |
isTableEnabled(ByteBuffer tableName) |
void |
majorCompact(ByteBuffer tableNameOrRegionName) |
void |
mutateRow(ByteBuffer tableName,
ByteBuffer row,
List<org.apache.hadoop.hbase.thrift.generated.Mutation> mutations,
Map<ByteBuffer,ByteBuffer> attributes)
Apply a series of mutations (updates/deletes) to a row in a
single transaction.
|
void |
mutateRows(ByteBuffer tableName,
List<org.apache.hadoop.hbase.thrift.generated.BatchMutation> rowBatches,
Map<ByteBuffer,ByteBuffer> attributes)
Apply a series of batches (each a series of mutations on a single row)
in a single transaction.
|
void |
mutateRowsTs(ByteBuffer tableName,
List<org.apache.hadoop.hbase.thrift.generated.BatchMutation> rowBatches,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Apply a series of batches (each a series of mutations on a single row)
in a single transaction.
|
void |
mutateRowTs(ByteBuffer tableName,
ByteBuffer row,
List<org.apache.hadoop.hbase.thrift.generated.Mutation> mutations,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Apply a series of mutations (updates/deletes) to a row in a
single transaction.
|
private void |
removeScanner(int id)
Removes the scanner associated with the specified ID from the internal id->scanner hash-map.
|
void |
scannerClose(int id)
Closes the server-state associated with an open scanner.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
scannerGet(int id)
Returns the scanner's current row value and advances to the next
row in the table.
|
List<org.apache.hadoop.hbase.thrift.generated.TRowResult> |
scannerGetList(int id,
int nbRows)
Returns, starting at the scanner's current row value nbRows worth of
rows and advances to the next row in the table.
|
int |
scannerOpen(ByteBuffer tableName,
ByteBuffer startRow,
List<ByteBuffer> columns,
Map<ByteBuffer,ByteBuffer> attributes)
Get a scanner on the current table starting at the specified row and
ending at the last row in the table.
|
int |
scannerOpenTs(ByteBuffer tableName,
ByteBuffer startRow,
List<ByteBuffer> columns,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Get a scanner on the current table starting at the specified row and
ending at the last row in the table.
|
int |
scannerOpenWithPrefix(ByteBuffer tableName,
ByteBuffer startAndPrefix,
List<ByteBuffer> columns,
Map<ByteBuffer,ByteBuffer> attributes)
Open a scanner for a given prefix.
|
int |
scannerOpenWithScan(ByteBuffer tableName,
org.apache.hadoop.hbase.thrift.generated.TScan tScan,
Map<ByteBuffer,ByteBuffer> attributes)
Get a scanner on the current table, using the Scan instance
for the scan parameters.
|
int |
scannerOpenWithStop(ByteBuffer tableName,
ByteBuffer startRow,
ByteBuffer stopRow,
List<ByteBuffer> columns,
Map<ByteBuffer,ByteBuffer> attributes)
Get a scanner on the current table starting and stopping at the
specified rows.
|
int |
scannerOpenWithStopTs(ByteBuffer tableName,
ByteBuffer startRow,
ByteBuffer stopRow,
List<ByteBuffer> columns,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Get a scanner on the current table starting and stopping at the
specified rows.
|
getAdmin, getTable, getTable, initMetrics, setEffectiveUser
private static final org.slf4j.Logger LOG
public static final int HREGION_VERSION
private int nextScannerId
private org.apache.hbase.thirdparty.com.google.common.cache.Cache<Integer,ThriftHBaseServiceHandler.ResultScannerWrapper> scannerMap
IncrementCoalescer coalescer
protected ThriftHBaseServiceHandler(org.apache.hadoop.conf.Configuration c, UserProvider userProvider) throws IOException
IOException
byte[][] getAllColumns(Table table) throws IOException
table
- table nIOException
protected int addScanner(ResultScanner scanner, boolean sortColumns)
scanner
- the ResultScanner
to addprivate ThriftHBaseServiceHandler.ResultScannerWrapper getScanner(int id)
id
- the ID of the scanner to getprivate void removeScanner(int id)
id
- the ID of the scanner to removepublic void enableTable(ByteBuffer tableName) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
enableTable
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of the tableorg.apache.hadoop.hbase.thrift.generated.IOError
public void disableTable(ByteBuffer tableName) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
disableTable
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of the tableorg.apache.hadoop.hbase.thrift.generated.IOError
public boolean isTableEnabled(ByteBuffer tableName) throws org.apache.hadoop.hbase.thrift.generated.IOError
isTableEnabled
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of the table to checkorg.apache.hadoop.hbase.thrift.generated.IOError
public Map<ByteBuffer,Boolean> getTableNamesWithIsTableEnabled() throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getTableNamesWithIsTableEnabled
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
org.apache.hadoop.hbase.thrift.generated.IOError
public void compact(ByteBuffer tableNameOrRegionName) throws org.apache.hadoop.hbase.thrift.generated.IOError
compact
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
org.apache.hadoop.hbase.thrift.generated.IOError
public void majorCompact(ByteBuffer tableNameOrRegionName) throws org.apache.hadoop.hbase.thrift.generated.IOError
majorCompact
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
org.apache.hadoop.hbase.thrift.generated.IOError
public List<ByteBuffer> getTableNames() throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getTableNames
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
org.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRegionInfo> getTableRegions(ByteBuffer tableName) throws org.apache.hadoop.hbase.thrift.generated.IOError
getTableRegions
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- table nameorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TCell> get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
get
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keycolumn
- column nameattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
protected List<org.apache.hadoop.hbase.thrift.generated.TCell> get(ByteBuffer tableName, ByteBuffer row, byte[] family, byte[] qualifier, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
get(ByteBuffer, ByteBuffer, ByteBuffer, Map)
) interface IS consistent in that the
column is parse like normal.org.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TCell> getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getVer
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keycolumn
- column namenumVersions
- number of versions to retrieveattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TCell> getVer(ByteBuffer tableName, ByteBuffer row, byte[] family, byte[] qualifier, int numVersions, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
getVer(ByteBuffer, ByteBuffer, ByteBuffer, int, Map)
with a
column
value that lacks a ':'
.org.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getVerTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keycolumn
- column nametimestamp
- timestampnumVersions
- number of versions to retrieveattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
protected List<org.apache.hadoop.hbase.thrift.generated.TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, byte[] family, byte[] qualifier, long timestamp, int numVersions, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
getVerTs(ByteBuffer, ByteBuffer, ByteBuffer, long, int, Map)
) interface IS consistent
in that the column is parse like normal.org.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRow(ByteBuffer tableName, ByteBuffer row, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRow
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keyattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRowWithColumns
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keycolumns
- List of columns to return, null for all columnsattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRowTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of the tablerow
- row keytimestamp
- timestampattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRowWithColumnsTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keycolumns
- List of columns to return, null for all columnsattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRows(ByteBuffer tableName, List<ByteBuffer> rows, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRows
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerows
- row keysattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRowsWithColumns
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerows
- row keyscolumns
- List of columns to return, null for all columnsattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRowsTs(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRowsTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of the tablerows
- row keystimestamp
- timestampattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> getRowsWithColumnsTs(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRowsWithColumnsTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerows
- row keyscolumns
- List of columns to return, null for all columnsattributes
- Get attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
deleteAll
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- Row to updatecolumn
- name of column whose value is to be deletedattributes
- Delete attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
deleteAllTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- Row to updatecolumn
- name of column whose value is to be deletedtimestamp
- timestampattributes
- Delete attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
deleteAllRow
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- key of the row to be completely deleted.attributes
- Delete attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
deleteAllRowTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- key of the row to be completely deleted.timestamp
- timestampattributes
- Delete attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public void createTable(ByteBuffer in_tableName, List<org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor> columnFamilies) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.hadoop.hbase.thrift.generated.AlreadyExists
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
createTable
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
in_tableName
- name of table to createcolumnFamilies
- list of column family descriptorsorg.apache.hadoop.hbase.thrift.generated.IllegalArgument
- if an input parameter is invalidorg.apache.hadoop.hbase.thrift.generated.AlreadyExists
- if the table name already existsorg.apache.hadoop.hbase.thrift.generated.IOError
private static TableName getTableName(ByteBuffer buffer)
public void deleteTable(ByteBuffer in_tableName) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
deleteTable
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
in_tableName
- name of table to deleteorg.apache.hadoop.hbase.thrift.generated.IOError
- if table doesn't exist on server or there was some other
problempublic void mutateRow(ByteBuffer tableName, ByteBuffer row, List<org.apache.hadoop.hbase.thrift.generated.Mutation> mutations, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
mutateRow
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keymutations
- list of mutation commandsattributes
- Mutation attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IllegalArgument
public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<org.apache.hadoop.hbase.thrift.generated.Mutation> mutations, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
mutateRowTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keymutations
- list of mutation commandstimestamp
- timestampattributes
- Mutation attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IllegalArgument
public void mutateRows(ByteBuffer tableName, List<org.apache.hadoop.hbase.thrift.generated.BatchMutation> rowBatches, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
mutateRows
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerowBatches
- list of row batchesattributes
- Mutation attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.thrift.TException
public void mutateRowsTs(ByteBuffer tableName, List<org.apache.hadoop.hbase.thrift.generated.BatchMutation> rowBatches, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
mutateRowsTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerowBatches
- list of row batchestimestamp
- timestampattributes
- Mutation attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.thrift.TException
public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long amount) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
atomicIncrement
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row to incrementcolumn
- name of columnamount
- amount to increment byorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.thrift.TException
protected long atomicIncrement(ByteBuffer tableName, ByteBuffer row, byte[] family, byte[] qualifier, long amount) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.thrift.TException
public void scannerClose(int id) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerClose
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
id
- id of a scanner returned by scannerOpenorg.apache.hadoop.hbase.thrift.generated.IllegalArgument
- if ScannerID is invalidorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> scannerGetList(int id, int nbRows) throws org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerGetList
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
id
- id of a scanner returned by scannerOpennbRows
- number of results to returnorg.apache.hadoop.hbase.thrift.generated.IllegalArgument
- if ScannerID is invalidorg.apache.hadoop.hbase.thrift.generated.IOError
public List<org.apache.hadoop.hbase.thrift.generated.TRowResult> scannerGet(int id) throws org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerGet
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
id
- id of a scanner returned by scannerOpenorg.apache.hadoop.hbase.thrift.generated.IllegalArgument
- if ScannerID is invalidorg.apache.hadoop.hbase.thrift.generated.IOError
public int scannerOpenWithScan(ByteBuffer tableName, org.apache.hadoop.hbase.thrift.generated.TScan tScan, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerOpenWithScan
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tabletScan
- Scan instanceattributes
- Scan attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerOpen
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablestartRow
- Starting row in table to scan.
Send "" (empty string) to start at the first row.columns
- columns to scan. If column name is a column family, all
columns of the specified column family are returned. It's also possible
to pass a regex in the column qualifier.attributes
- Scan attributesorg.apache.hadoop.hbase.thrift.generated.IOError
public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerOpenWithStop
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablestartRow
- Starting row in table to scan.
Send "" (empty string) to start at the first row.stopRow
- row to stop scanning on. This row is *not* included in the
scanner's resultscolumns
- columns to scan. If column name is a column family, all
columns of the specified column family are returned. It's also possible
to pass a regex in the column qualifier.attributes
- Scan attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
public int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerOpenWithPrefix
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablestartAndPrefix
- the prefix (and thus start row) of the keys you wantcolumns
- the columns you want returnedattributes
- Scan attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerOpenTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablestartRow
- Starting row in table to scan.
Send "" (empty string) to start at the first row.columns
- columns to scan. If column name is a column family, all
columns of the specified column family are returned. It's also possible
to pass a regex in the column qualifier.timestamp
- timestampattributes
- Scan attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
scannerOpenWithStopTs
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablestartRow
- Starting row in table to scan.
Send "" (empty string) to start at the first row.stopRow
- row to stop scanning on. This row is *not* included in the
scanner's resultscolumns
- columns to scan. If column name is a column family, all
columns of the specified column family are returned. It's also possible
to pass a regex in the column qualifier.timestamp
- timestampattributes
- Scan attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
public Map<ByteBuffer,org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor> getColumnDescriptors(ByteBuffer tableName) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getColumnDescriptors
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- table nameorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
private void closeTable(Table table) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IOError
public org.apache.hadoop.hbase.thrift.generated.TRegionInfo getRegionInfo(ByteBuffer searchRow) throws org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getRegionInfo
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
searchRow
- row keyorg.apache.hadoop.hbase.thrift.generated.IOError
private Result getReverseScanResult(byte[] tableName, byte[] row, byte[] family) throws IOException
IOException
public void increment(org.apache.hadoop.hbase.thrift.generated.TIncrement tincrement) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
increment
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tincrement
- The single increment to applyorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
public void incrementRows(List<org.apache.hadoop.hbase.thrift.generated.TIncrement> tincrements) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
incrementRows
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
org.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
public List<org.apache.hadoop.hbase.thrift.generated.TCell> append(org.apache.hadoop.hbase.thrift.generated.TAppend tappend) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
append
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tappend
- The single append operation to applyorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.thrift.TException
public boolean checkAndPut(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, ByteBuffer value, org.apache.hadoop.hbase.thrift.generated.Mutation mput, Map<ByteBuffer,ByteBuffer> attributes) throws org.apache.hadoop.hbase.thrift.generated.IOError, org.apache.hadoop.hbase.thrift.generated.IllegalArgument, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
checkAndPut
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
tableName
- name of tablerow
- row keycolumn
- column namevalue
- the expected value for the column parameter, if not
provided the check is for the non-existence of the
column in questionmput
- mutation for the putattributes
- Mutation attributesorg.apache.hadoop.hbase.thrift.generated.IOError
org.apache.hadoop.hbase.thrift.generated.IllegalArgument
org.apache.thrift.TException
public org.apache.hadoop.hbase.thrift.generated.TThriftServerType getThriftServerType()
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getThriftServerType
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
public String getClusterId() throws org.apache.thrift.TException
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
getClusterId
in interface org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
org.apache.thrift.TException
private static org.apache.hadoop.hbase.thrift.generated.IOError getIOError(Throwable throwable)
private static void addAttributes(OperationWithAttributes op, Map<ByteBuffer,ByteBuffer> attributes)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.