org.apache.hadoop.hbase.thrift.generated
Interface Hbase.Iface

All Known Implementing Classes:
Hbase.Client, ThriftServer.HBaseHandler
Enclosing class:
Hbase

public static interface Hbase.Iface


Method Summary
 long atomicIncrement(byte[] tableName, byte[] row, byte[] column, long value)
          Atomically increment the column value specified.
 void compact(byte[] tableNameOrRegionName)
           
 void createTable(byte[] tableName, List<ColumnDescriptor> columnFamilies)
          Create a table with the specified column families.
 void deleteAll(byte[] tableName, byte[] row, byte[] column)
          Delete all cells that match the passed row and column.
 void deleteAllRow(byte[] tableName, byte[] row)
          Completely delete the row's cells.
 void deleteAllRowTs(byte[] tableName, byte[] row, long timestamp)
          Completely delete the row's cells marked with a timestamp equal-to or older than the passed timestamp.
 void deleteAllTs(byte[] tableName, byte[] row, byte[] column, long timestamp)
          Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp.
 void deleteTable(byte[] tableName)
          Deletes a table
 void disableTable(byte[] 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(byte[] tableName)
          Brings a table on-line (enables it)
 List<TCell> get(byte[] tableName, byte[] row, byte[] column)
          Get a single TCell for the specified table, row, and column at the latest timestamp.
 Map<byte[],ColumnDescriptor> getColumnDescriptors(byte[] tableName)
          List all the column families assoicated with a table.
 List<TRowResult> getRow(byte[] tableName, byte[] row)
          Get all the data for the specified table and row at the latest timestamp.
 List<TRowResult> getRows(byte[] tableName, List<byte[]> rows)
          Get all the data for the specified table and rows at the latest timestamp.
 List<TRowResult> getRowsTs(byte[] tableName, List<byte[]> rows, long timestamp)
          Get all the data for the specified table and rows at the specified timestamp.
 List<TRowResult> getRowsWithColumns(byte[] tableName, List<byte[]> rows, List<byte[]> columns)
          Get the specified columns for the specified table and rows at the latest timestamp.
 List<TRowResult> getRowsWithColumnsTs(byte[] tableName, List<byte[]> rows, List<byte[]> columns, long timestamp)
          Get the specified columns for the specified table and rows at the specified timestamp.
 List<TRowResult> getRowTs(byte[] tableName, byte[] row, long timestamp)
          Get all the data for the specified table and row at the specified timestamp.
 List<TRowResult> getRowWithColumns(byte[] tableName, byte[] row, List<byte[]> columns)
          Get the specified columns for the specified table and row at the latest timestamp.
 List<TRowResult> getRowWithColumnsTs(byte[] tableName, byte[] row, List<byte[]> columns, long timestamp)
          Get the specified columns for the specified table and row at the specified timestamp.
 List<byte[]> getTableNames()
          List all the userspace tables.
 List<TRegionInfo> getTableRegions(byte[] tableName)
          List the regions associated with a table.
 List<TCell> getVer(byte[] tableName, byte[] row, byte[] column, int numVersions)
          Get the specified number of versions for the specified table, row, and column.
 List<TCell> getVerTs(byte[] tableName, byte[] row, byte[] column, long timestamp, int numVersions)
          Get the specified number of versions for the specified table, row, and column.
 boolean isTableEnabled(byte[] tableName)
           
 void majorCompact(byte[] tableNameOrRegionName)
           
 void mutateRow(byte[] tableName, byte[] row, List<Mutation> mutations)
          Apply a series of mutations (updates/deletes) to a row in a single transaction.
 void mutateRows(byte[] tableName, List<BatchMutation> rowBatches)
          Apply a series of batches (each a series of mutations on a single row) in a single transaction.
 void mutateRowsTs(byte[] tableName, List<BatchMutation> rowBatches, long timestamp)
          Apply a series of batches (each a series of mutations on a single row) in a single transaction.
 void mutateRowTs(byte[] tableName, byte[] row, List<Mutation> mutations, long timestamp)
          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(byte[] tableName, byte[] startRow, List<byte[]> columns)
          Get a scanner on the current table starting at the specified row and ending at the last row in the table.
 int scannerOpenTs(byte[] tableName, byte[] startRow, List<byte[]> columns, long timestamp)
          Get a scanner on the current table starting at the specified row and ending at the last row in the table.
 int scannerOpenWithPrefix(byte[] tableName, byte[] startAndPrefix, List<byte[]> columns)
          Open a scanner for a given prefix.
 int scannerOpenWithStop(byte[] tableName, byte[] startRow, byte[] stopRow, List<byte[]> columns)
          Get a scanner on the current table starting and stopping at the specified rows.
 int scannerOpenWithStopTs(byte[] tableName, byte[] startRow, byte[] stopRow, List<byte[]> columns, long timestamp)
          Get a scanner on the current table starting and stopping at the specified rows.
 

Method Detail

enableTable

void enableTable(byte[] tableName)
                 throws IOError,
                        org.apache.thrift.TException
Brings a table on-line (enables it)

Parameters:
tableName - name of the table
Throws:
IOError
org.apache.thrift.TException

disableTable

void disableTable(byte[] tableName)
                  throws IOError,
                         org.apache.thrift.TException
Disables a table (takes it off-line) If it is being served, the master will tell the servers to stop serving it.

Parameters:
tableName - name of the table
Throws:
IOError
org.apache.thrift.TException

isTableEnabled

boolean isTableEnabled(byte[] tableName)
                       throws IOError,
                              org.apache.thrift.TException
Parameters:
tableName - name of the table to check
Returns:
true if table is on-line
Throws:
IOError
org.apache.thrift.TException

compact

void compact(byte[] tableNameOrRegionName)
             throws IOError,
                    org.apache.thrift.TException
Throws:
IOError
org.apache.thrift.TException

majorCompact

void majorCompact(byte[] tableNameOrRegionName)
                  throws IOError,
                         org.apache.thrift.TException
Throws:
IOError
org.apache.thrift.TException

getTableNames

List<byte[]> getTableNames()
                           throws IOError,
                                  org.apache.thrift.TException
List all the userspace tables.

Returns:
returns a list of names
Throws:
IOError
org.apache.thrift.TException

getColumnDescriptors

Map<byte[],ColumnDescriptor> getColumnDescriptors(byte[] tableName)
                                                  throws IOError,
                                                         org.apache.thrift.TException
List all the column families assoicated with a table.

Parameters:
tableName - table name
Returns:
list of column family descriptors
Throws:
IOError
org.apache.thrift.TException

getTableRegions

List<TRegionInfo> getTableRegions(byte[] tableName)
                                  throws IOError,
                                         org.apache.thrift.TException
List the regions associated with a table.

Parameters:
tableName - table name
Returns:
list of region descriptors
Throws:
IOError
org.apache.thrift.TException

createTable

void createTable(byte[] tableName,
                 List<ColumnDescriptor> columnFamilies)
                 throws IOError,
                        IllegalArgument,
                        AlreadyExists,
                        org.apache.thrift.TException
Create a table with the specified column families. The name field for each ColumnDescriptor must be set and must end in a colon (:). All other fields are optional and will get default values if not explicitly specified.

Parameters:
tableName - name of table to create
columnFamilies - list of column family descriptors
Throws:
IllegalArgument - if an input parameter is invalid
AlreadyExists - if the table name already exists
IOError
org.apache.thrift.TException

deleteTable

void deleteTable(byte[] tableName)
                 throws IOError,
                        org.apache.thrift.TException
Deletes a table

Parameters:
tableName - name of table to delete
Throws:
IOError - if table doesn't exist on server or there was some other problem
org.apache.thrift.TException

get

List<TCell> get(byte[] tableName,
                byte[] row,
                byte[] column)
                throws IOError,
                       org.apache.thrift.TException
Get a single TCell for the specified table, row, and column at the latest timestamp. Returns an empty list if no such value exists.

Parameters:
tableName - name of table
row - row key
column - column name
Returns:
value for specified row/column
Throws:
IOError
org.apache.thrift.TException

getVer

List<TCell> getVer(byte[] tableName,
                   byte[] row,
                   byte[] column,
                   int numVersions)
                   throws IOError,
                          org.apache.thrift.TException
Get the specified number of versions for the specified table, row, and column.

Parameters:
tableName - name of table
row - row key
column - column name
numVersions - number of versions to retrieve
Returns:
list of cells for specified row/column
Throws:
IOError
org.apache.thrift.TException

getVerTs

List<TCell> getVerTs(byte[] tableName,
                     byte[] row,
                     byte[] column,
                     long timestamp,
                     int numVersions)
                     throws IOError,
                            org.apache.thrift.TException
Get the specified number of versions for the specified table, row, and column. Only versions less than or equal to the specified timestamp will be returned.

Parameters:
tableName - name of table
row - row key
column - column name
timestamp - timestamp
numVersions - number of versions to retrieve
Returns:
list of cells for specified row/column
Throws:
IOError
org.apache.thrift.TException

getRow

List<TRowResult> getRow(byte[] tableName,
                        byte[] row)
                        throws IOError,
                               org.apache.thrift.TException
Get all the data for the specified table and row at the latest timestamp. Returns an empty list if the row does not exist.

Parameters:
tableName - name of table
row - row key
Returns:
TRowResult containing the row and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

getRowWithColumns

List<TRowResult> getRowWithColumns(byte[] tableName,
                                   byte[] row,
                                   List<byte[]> columns)
                                   throws IOError,
                                          org.apache.thrift.TException
Get the specified columns for the specified table and row at the latest timestamp. Returns an empty list if the row does not exist.

Parameters:
tableName - name of table
row - row key
columns - List of columns to return, null for all columns
Returns:
TRowResult containing the row and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

getRowTs

List<TRowResult> getRowTs(byte[] tableName,
                          byte[] row,
                          long timestamp)
                          throws IOError,
                                 org.apache.thrift.TException
Get all the data for the specified table and row at the specified timestamp. Returns an empty list if the row does not exist.

Parameters:
tableName - name of the table
row - row key
timestamp - timestamp
Returns:
TRowResult containing the row and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

getRowWithColumnsTs

List<TRowResult> getRowWithColumnsTs(byte[] tableName,
                                     byte[] row,
                                     List<byte[]> columns,
                                     long timestamp)
                                     throws IOError,
                                            org.apache.thrift.TException
Get the specified columns for the specified table and row at the specified timestamp. Returns an empty list if the row does not exist.

Parameters:
tableName - name of table
row - row key
columns - List of columns to return, null for all columns
timestamp -
Returns:
TRowResult containing the row and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

getRows

List<TRowResult> getRows(byte[] tableName,
                         List<byte[]> rows)
                         throws IOError,
                                org.apache.thrift.TException
Get all the data for the specified table and rows at the latest timestamp. Returns an empty list if no rows exist.

Parameters:
tableName - name of table
rows - row keys
Returns:
TRowResult containing the rows and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

getRowsWithColumns

List<TRowResult> getRowsWithColumns(byte[] tableName,
                                    List<byte[]> rows,
                                    List<byte[]> columns)
                                    throws IOError,
                                           org.apache.thrift.TException
Get the specified columns for the specified table and rows at the latest timestamp. Returns an empty list if no rows exist.

Parameters:
tableName - name of table
rows - row keys
columns - List of columns to return, null for all columns
Returns:
TRowResult containing the rows and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

getRowsTs

List<TRowResult> getRowsTs(byte[] tableName,
                           List<byte[]> rows,
                           long timestamp)
                           throws IOError,
                                  org.apache.thrift.TException
Get all the data for the specified table and rows at the specified timestamp. Returns an empty list if no rows exist.

Parameters:
tableName - name of the table
rows - row keys
timestamp - timestamp
Returns:
TRowResult containing the rows and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

getRowsWithColumnsTs

List<TRowResult> getRowsWithColumnsTs(byte[] tableName,
                                      List<byte[]> rows,
                                      List<byte[]> columns,
                                      long timestamp)
                                      throws IOError,
                                             org.apache.thrift.TException
Get the specified columns for the specified table and rows at the specified timestamp. Returns an empty list if no rows exist.

Parameters:
tableName - name of table
rows - row keys
columns - List of columns to return, null for all columns
timestamp -
Returns:
TRowResult containing the rows and map of columns to TCells
Throws:
IOError
org.apache.thrift.TException

mutateRow

void mutateRow(byte[] tableName,
               byte[] row,
               List<Mutation> mutations)
               throws IOError,
                      IllegalArgument,
                      org.apache.thrift.TException
Apply a series of mutations (updates/deletes) to a row in a single transaction. If an exception is thrown, then the transaction is aborted. Default current timestamp is used, and all entries will have an identical timestamp.

Parameters:
tableName - name of table
row - row key
mutations - list of mutation commands
Throws:
IOError
IllegalArgument
org.apache.thrift.TException

mutateRowTs

void mutateRowTs(byte[] tableName,
                 byte[] row,
                 List<Mutation> mutations,
                 long timestamp)
                 throws IOError,
                        IllegalArgument,
                        org.apache.thrift.TException
Apply a series of mutations (updates/deletes) to a row in a single transaction. If an exception is thrown, then the transaction is aborted. The specified timestamp is used, and all entries will have an identical timestamp.

Parameters:
tableName - name of table
row - row key
mutations - list of mutation commands
timestamp - timestamp
Throws:
IOError
IllegalArgument
org.apache.thrift.TException

mutateRows

void mutateRows(byte[] tableName,
                List<BatchMutation> rowBatches)
                throws IOError,
                       IllegalArgument,
                       org.apache.thrift.TException
Apply a series of batches (each a series of mutations on a single row) in a single transaction. If an exception is thrown, then the transaction is aborted. Default current timestamp is used, and all entries will have an identical timestamp.

Parameters:
tableName - name of table
rowBatches - list of row batches
Throws:
IOError
IllegalArgument
org.apache.thrift.TException

mutateRowsTs

void mutateRowsTs(byte[] tableName,
                  List<BatchMutation> rowBatches,
                  long timestamp)
                  throws IOError,
                         IllegalArgument,
                         org.apache.thrift.TException
Apply a series of batches (each a series of mutations on a single row) in a single transaction. If an exception is thrown, then the transaction is aborted. The specified timestamp is used, and all entries will have an identical timestamp.

Parameters:
tableName - name of table
rowBatches - list of row batches
timestamp - timestamp
Throws:
IOError
IllegalArgument
org.apache.thrift.TException

atomicIncrement

long atomicIncrement(byte[] tableName,
                     byte[] row,
                     byte[] column,
                     long value)
                     throws IOError,
                            IllegalArgument,
                            org.apache.thrift.TException
Atomically increment the column value specified. Returns the next value post increment.

Parameters:
tableName - name of table
row - row to increment
column - name of column
value - amount to increment by
Throws:
IOError
IllegalArgument
org.apache.thrift.TException

deleteAll

void deleteAll(byte[] tableName,
               byte[] row,
               byte[] column)
               throws IOError,
                      org.apache.thrift.TException
Delete all cells that match the passed row and column.

Parameters:
tableName - name of table
row - Row to update
column - name of column whose value is to be deleted
Throws:
IOError
org.apache.thrift.TException

deleteAllTs

void deleteAllTs(byte[] tableName,
                 byte[] row,
                 byte[] column,
                 long timestamp)
                 throws IOError,
                        org.apache.thrift.TException
Delete all cells that match the passed row and column and whose timestamp is equal-to or older than the passed timestamp.

Parameters:
tableName - name of table
row - Row to update
column - name of column whose value is to be deleted
timestamp - timestamp
Throws:
IOError
org.apache.thrift.TException

deleteAllRow

void deleteAllRow(byte[] tableName,
                  byte[] row)
                  throws IOError,
                         org.apache.thrift.TException
Completely delete the row's cells.

Parameters:
tableName - name of table
row - key of the row to be completely deleted.
Throws:
IOError
org.apache.thrift.TException

deleteAllRowTs

void deleteAllRowTs(byte[] tableName,
                    byte[] row,
                    long timestamp)
                    throws IOError,
                           org.apache.thrift.TException
Completely delete the row's cells marked with a timestamp equal-to or older than the passed timestamp.

Parameters:
tableName - name of table
row - key of the row to be completely deleted.
timestamp - timestamp
Throws:
IOError
org.apache.thrift.TException

scannerOpen

int scannerOpen(byte[] tableName,
                byte[] startRow,
                List<byte[]> columns)
                throws IOError,
                       org.apache.thrift.TException
Get a scanner on the current table starting at the specified row and ending at the last row in the table. Return the specified columns.

Parameters:
tableName - name of table
startRow - 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.
Returns:
scanner id to be used with other scanner procedures
Throws:
IOError
org.apache.thrift.TException

scannerOpenWithStop

int scannerOpenWithStop(byte[] tableName,
                        byte[] startRow,
                        byte[] stopRow,
                        List<byte[]> columns)
                        throws IOError,
                               org.apache.thrift.TException
Get a scanner on the current table starting and stopping at the specified rows. ending at the last row in the table. Return the specified columns.

Parameters:
tableName - name of table
startRow - 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 results
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.
Returns:
scanner id to be used with other scanner procedures
Throws:
IOError
org.apache.thrift.TException

scannerOpenWithPrefix

int scannerOpenWithPrefix(byte[] tableName,
                          byte[] startAndPrefix,
                          List<byte[]> columns)
                          throws IOError,
                                 org.apache.thrift.TException
Open a scanner for a given prefix. That is all rows will have the specified prefix. No other rows will be returned.

Parameters:
tableName - name of table
startAndPrefix - the prefix (and thus start row) of the keys you want
columns - the columns you want returned
Returns:
scanner id to use with other scanner calls
Throws:
IOError
org.apache.thrift.TException

scannerOpenTs

int scannerOpenTs(byte[] tableName,
                  byte[] startRow,
                  List<byte[]> columns,
                  long timestamp)
                  throws IOError,
                         org.apache.thrift.TException
Get a scanner on the current table starting at the specified row and ending at the last row in the table. Return the specified columns. Only values with the specified timestamp are returned.

Parameters:
tableName - name of table
startRow - 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 - timestamp
Returns:
scanner id to be used with other scanner procedures
Throws:
IOError
org.apache.thrift.TException

scannerOpenWithStopTs

int scannerOpenWithStopTs(byte[] tableName,
                          byte[] startRow,
                          byte[] stopRow,
                          List<byte[]> columns,
                          long timestamp)
                          throws IOError,
                                 org.apache.thrift.TException
Get a scanner on the current table starting and stopping at the specified rows. ending at the last row in the table. Return the specified columns. Only values with the specified timestamp are returned.

Parameters:
tableName - name of table
startRow - 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 results
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 - timestamp
Returns:
scanner id to be used with other scanner procedures
Throws:
IOError
org.apache.thrift.TException

scannerGet

List<TRowResult> scannerGet(int id)
                            throws IOError,
                                   IllegalArgument,
                                   org.apache.thrift.TException
Returns the scanner's current row value and advances to the next row in the table. When there are no more rows in the table, or a key greater-than-or-equal-to the scanner's specified stopRow is reached, an empty list is returned.

Parameters:
id - id of a scanner returned by scannerOpen
Returns:
a TRowResult containing the current row and a map of the columns to TCells.
Throws:
IllegalArgument - if ScannerID is invalid
NotFound - when the scanner reaches the end
IOError
org.apache.thrift.TException

scannerGetList

List<TRowResult> scannerGetList(int id,
                                int nbRows)
                                throws IOError,
                                       IllegalArgument,
                                       org.apache.thrift.TException
Returns, starting at the scanner's current row value nbRows worth of rows and advances to the next row in the table. When there are no more rows in the table, or a key greater-than-or-equal-to the scanner's specified stopRow is reached, an empty list is returned.

Parameters:
id - id of a scanner returned by scannerOpen
nbRows - number of results to return
Returns:
a TRowResult containing the current row and a map of the columns to TCells.
Throws:
IllegalArgument - if ScannerID is invalid
NotFound - when the scanner reaches the end
IOError
org.apache.thrift.TException

scannerClose

void scannerClose(int id)
                  throws IOError,
                         IllegalArgument,
                         org.apache.thrift.TException
Closes the server-state associated with an open scanner.

Parameters:
id - id of a scanner returned by scannerOpen
Throws:
IllegalArgument - if ScannerID is invalid
IOError
org.apache.thrift.TException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.