public static class ThriftServerRunner.HBaseHandler extends Object implements org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
Modifier and Type | Field and Description |
---|---|
(package private) static String |
CLEANUP_INTERVAL |
(package private) IncrementCoalescer |
coalescer |
protected org.apache.hadoop.conf.Configuration |
conf |
private ConnectionCache |
connectionCache |
protected static org.slf4j.Logger |
LOG |
(package private) static String |
MAX_IDLETIME |
private ThriftMetrics |
metrics |
protected int |
nextScannerId |
protected HashMap<Integer,ThriftServerRunner.ResultScannerWrapper> |
scannerMap |
Modifier | Constructor and Description |
---|---|
protected |
HBaseHandler(org.apache.hadoop.conf.Configuration c,
UserProvider userProvider) |
Modifier and Type | Method and Description |
---|---|
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.
|
private Admin |
getAdmin()
Obtain HBaseAdmin.
|
(package private) byte[][] |
getAllColumns(Table table)
Returns a list of all the column families for a given Table.
|
Map<ByteBuffer,org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor> |
getColumnDescriptors(ByteBuffer tableName)
List all the column families assoicated with a table.
|
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.
|
protected ThriftServerRunner.ResultScannerWrapper |
getScanner(int id)
Returns the scanner associated with the specified ID.
|
Table |
getTable(byte[] tableName)
Creates and returns a Table instance from a given table name.
|
Table |
getTable(ByteBuffer tableName) |
private static TableName |
getTableName(ByteBuffer buffer) |
List<ByteBuffer> |
getTableNames()
List all the userspace tables.
|
List<org.apache.hadoop.hbase.thrift.generated.TRegionInfo> |
getTableRegions(ByteBuffer tableName)
List the regions associated with a table.
|
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) |
private void |
initMetrics(ThriftMetrics metrics) |
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.
|
protected ThriftServerRunner.ResultScannerWrapper |
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.
|
(package private) void |
setEffectiveUser(String effectiveUser) |
protected org.apache.hadoop.conf.Configuration conf
protected static final org.slf4j.Logger LOG
protected int nextScannerId
protected HashMap<Integer,ThriftServerRunner.ResultScannerWrapper> scannerMap
private ThriftMetrics metrics
private final ConnectionCache connectionCache
IncrementCoalescer coalescer
static final String CLEANUP_INTERVAL
static final String MAX_IDLETIME
protected HBaseHandler(org.apache.hadoop.conf.Configuration c, UserProvider userProvider) throws IOException
IOException
byte[][] getAllColumns(Table table) throws IOException
table
- IOException
public Table getTable(byte[] tableName) throws IOException
tableName
- name of tableIOException
public Table getTable(ByteBuffer tableName) throws IOException
IOException
protected int addScanner(ResultScanner scanner, boolean sortColumns)
scanner
- protected ThriftServerRunner.ResultScannerWrapper getScanner(int id)
id
- protected ThriftServerRunner.ResultScannerWrapper removeScanner(int id)
id
- private Admin getAdmin() throws IOException
IOException
void setEffectiveUser(String effectiveUser)
public 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 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
org.apache.hadoop.hbase.thrift.generated.Hbase.Iface
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
private void initMetrics(ThriftMetrics metrics)
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
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.