public static interface Hbase.Iface
Modifier and Type | Method and Description |
---|---|
List<TCell> |
append(TAppend append)
Appends values to one or more columns within a single row.
|
long |
atomicIncrement(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
long value)
Atomically increment the column value specified.
|
boolean |
checkAndPut(ByteBuffer tableName,
ByteBuffer row,
ByteBuffer column,
ByteBuffer value,
Mutation mput,
Map<ByteBuffer,ByteBuffer> attributes)
Atomically checks if a row/family/qualifier value matches the expected
value.
|
void |
compact(ByteBuffer tableNameOrRegionName) |
void |
createTable(ByteBuffer tableName,
List<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 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)
|
List<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.
|
Map<ByteBuffer,ColumnDescriptor> |
getColumnDescriptors(ByteBuffer tableName)
List all the column families assoicated with a table.
|
TRegionInfo |
getRegionInfo(ByteBuffer row)
Get the regininfo for the specified row.
|
List<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<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<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<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<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<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<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<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.
|
List<ByteBuffer> |
getTableNames()
List all the userspace tables.
|
List<TRegionInfo> |
getTableRegions(ByteBuffer tableName)
List the regions associated with a table.
|
List<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.
|
List<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(TIncrement increment)
Increment a cell by the ammount.
|
void |
incrementRows(List<TIncrement> increments) |
boolean |
isTableEnabled(ByteBuffer tableName) |
void |
majorCompact(ByteBuffer tableNameOrRegionName) |
void |
mutateRow(ByteBuffer tableName,
ByteBuffer row,
List<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<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<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<Mutation> mutations,
long timestamp,
Map<ByteBuffer,ByteBuffer> attributes)
Apply a series of mutations (updates/deletes) to a row in a
single transaction.
|
void |
scannerClose(int id)
Closes the server-state associated with an open scanner.
|
List<TRowResult> |
scannerGet(int id)
Returns the scanner's current row value and advances to the next
row in the table.
|
List<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,
TScan scan,
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.
|
void enableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
tableName
- name of the tableIOError
org.apache.thrift.TException
void disableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
tableName
- name of the tableIOError
org.apache.thrift.TException
boolean isTableEnabled(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
tableName
- name of the table to checkIOError
org.apache.thrift.TException
void compact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException
IOError
org.apache.thrift.TException
void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException
IOError
org.apache.thrift.TException
List<ByteBuffer> getTableNames() throws IOError, org.apache.thrift.TException
IOError
org.apache.thrift.TException
Map<ByteBuffer,ColumnDescriptor> getColumnDescriptors(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
tableName
- table nameIOError
org.apache.thrift.TException
List<TRegionInfo> getTableRegions(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
tableName
- table nameIOError
org.apache.thrift.TException
void createTable(ByteBuffer tableName, List<ColumnDescriptor> columnFamilies) throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException
tableName
- name of table to createcolumnFamilies
- list of column family descriptorsIllegalArgument
- if an input parameter is invalidAlreadyExists
- if the table name already existsIOError
org.apache.thrift.TException
void deleteTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException
tableName
- name of table to deleteIOError
- if table doesn't exist on server or there was some other
problemorg.apache.thrift.TException
List<TCell> get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- row keycolumn
- column nameattributes
- Get attributesIOError
org.apache.thrift.TException
List<TCell> getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- row keycolumn
- column namenumVersions
- number of versions to retrieveattributes
- Get attributesIOError
org.apache.thrift.TException
List<TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- row keycolumn
- column nametimestamp
- timestampnumVersions
- number of versions to retrieveattributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRow(ByteBuffer tableName, ByteBuffer row, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- row keyattributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- row keycolumns
- List of columns to return, null for all columnsattributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of the tablerow
- row keytimestamp
- timestampattributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- row keycolumns
- List of columns to return, null for all columnstimestamp
- attributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRows(ByteBuffer tableName, List<ByteBuffer> rows, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerows
- row keysattributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRowsWithColumns(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerows
- row keyscolumns
- List of columns to return, null for all columnsattributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRowsTs(ByteBuffer tableName, List<ByteBuffer> rows, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of the tablerows
- row keystimestamp
- timestampattributes
- Get attributesIOError
org.apache.thrift.TException
List<TRowResult> getRowsWithColumnsTs(ByteBuffer tableName, List<ByteBuffer> rows, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerows
- row keyscolumns
- List of columns to return, null for all columnstimestamp
- attributes
- Get attributesIOError
org.apache.thrift.TException
void mutateRow(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, IllegalArgument, org.apache.thrift.TException
tableName
- name of tablerow
- row keymutations
- list of mutation commandsattributes
- Mutation attributesIOError
IllegalArgument
org.apache.thrift.TException
void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, IllegalArgument, org.apache.thrift.TException
tableName
- name of tablerow
- row keymutations
- list of mutation commandstimestamp
- timestampattributes
- Mutation attributesIOError
IllegalArgument
org.apache.thrift.TException
void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, IllegalArgument, org.apache.thrift.TException
tableName
- name of tablerowBatches
- list of row batchesattributes
- Mutation attributesIOError
IllegalArgument
org.apache.thrift.TException
void mutateRowsTs(ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, IllegalArgument, org.apache.thrift.TException
tableName
- name of tablerowBatches
- list of row batchestimestamp
- timestampattributes
- Mutation attributesIOError
IllegalArgument
org.apache.thrift.TException
long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws IOError, IllegalArgument, org.apache.thrift.TException
tableName
- name of tablerow
- row to incrementcolumn
- name of columnvalue
- amount to increment byIOError
IllegalArgument
org.apache.thrift.TException
void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- Row to updatecolumn
- name of column whose value is to be deletedattributes
- Delete attributesIOError
org.apache.thrift.TException
void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- Row to updatecolumn
- name of column whose value is to be deletedtimestamp
- timestampattributes
- Delete attributesIOError
org.apache.thrift.TException
void deleteAllRow(ByteBuffer tableName, ByteBuffer row, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- key of the row to be completely deleted.attributes
- Delete attributesIOError
org.apache.thrift.TException
void increment(TIncrement increment) throws IOError, org.apache.thrift.TException
increment
- The single increment to applyIOError
org.apache.thrift.TException
void incrementRows(List<TIncrement> increments) throws IOError, org.apache.thrift.TException
IOError
org.apache.thrift.TException
void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablerow
- key of the row to be completely deleted.timestamp
- timestampattributes
- Delete attributesIOError
org.apache.thrift.TException
int scannerOpenWithScan(ByteBuffer tableName, TScan scan, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablescan
- Scan instanceattributes
- Scan attributesIOError
org.apache.thrift.TException
int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
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 attributesIOError
org.apache.thrift.TException
int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
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 attributesIOError
org.apache.thrift.TException
int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List<ByteBuffer> columns, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
tableName
- name of tablestartAndPrefix
- the prefix (and thus start row) of the keys you wantcolumns
- the columns you want returnedattributes
- Scan attributesIOError
org.apache.thrift.TException
int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
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 attributesIOError
org.apache.thrift.TException
int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List<ByteBuffer> columns, long timestamp, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, org.apache.thrift.TException
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 attributesIOError
org.apache.thrift.TException
List<TRowResult> scannerGet(int id) throws IOError, IllegalArgument, org.apache.thrift.TException
id
- id of a scanner returned by scannerOpenIllegalArgument
- if ScannerID is invalidNotFound
- when the scanner reaches the endIOError
org.apache.thrift.TException
List<TRowResult> scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, org.apache.thrift.TException
id
- id of a scanner returned by scannerOpennbRows
- number of results to returnIllegalArgument
- if ScannerID is invalidNotFound
- when the scanner reaches the endIOError
org.apache.thrift.TException
void scannerClose(int id) throws IOError, IllegalArgument, org.apache.thrift.TException
id
- id of a scanner returned by scannerOpenIllegalArgument
- if ScannerID is invalidIOError
org.apache.thrift.TException
TRegionInfo getRegionInfo(ByteBuffer row) throws IOError, org.apache.thrift.TException
row
- row keyIOError
org.apache.thrift.TException
List<TCell> append(TAppend append) throws IOError, org.apache.thrift.TException
append
- The single append operation to applyIOError
org.apache.thrift.TException
boolean checkAndPut(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, ByteBuffer value, Mutation mput, Map<ByteBuffer,ByteBuffer> attributes) throws IOError, IllegalArgument, org.apache.thrift.TException
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 attributesIOError
IllegalArgument
org.apache.thrift.TException
Copyright © 2007–2019 Cloudera. All rights reserved.