Package org.apache.hadoop.hbase.thrift2
Class ThriftHBaseServiceHandler
java.lang.Object
org.apache.hadoop.hbase.thrift.HBaseServiceHandler
org.apache.hadoop.hbase.thrift2.ThriftHBaseServiceHandler
- All Implemented Interfaces:
org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
@Private
public class ThriftHBaseServiceHandler
extends HBaseServiceHandler
implements org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
This class is a glue object that connects Thrift RPC calls to the HBase client API primarily
defined in the Table interface.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final IOException
private boolean
private static final org.slf4j.Logger
private final AtomicInteger
private final org.apache.hbase.thirdparty.com.google.common.cache.Cache<Integer,
ResultScanner> Fields inherited from class org.apache.hadoop.hbase.thrift.HBaseServiceHandler
CLEANUP_INTERVAL, conf, connectionCache, MAX_IDLETIME, metrics
-
Constructor Summary
ConstructorDescriptionThriftHBaseServiceHandler
(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumnFamily
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor column) Add a column family to an existing table.private int
addScanner
(ResultScanner scanner) Assigns a unique ID to the scanner and adds the mapping to an internal HashMap.org.apache.hadoop.hbase.thrift2.generated.TResult
append
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TAppend append) boolean
checkAndDelete
(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, org.apache.hadoop.hbase.thrift2.generated.TDelete deleteSingle) Atomically checks if a row/family/qualifier value matches the expected value.boolean
checkAndMutate
(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, org.apache.hadoop.hbase.thrift2.generated.TCompareOp compareOp, ByteBuffer value, org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutations) Atomically checks if a row/family/qualifier value matches the expected value.boolean
checkAndPut
(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, org.apache.hadoop.hbase.thrift2.generated.TPut put) Atomically checks if a row/family/qualifier value matches the expected value.private void
clearSlowLogResponses
(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames) Clears online slow/large RPC logs from the provided list of RegionServersvoid
closeScanner
(int scannerId) Closes the scanner.private void
closeTable
(Table table) void
createNamespace
(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDesc) Create a new namespace.void
createTable
(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor desc, List<ByteBuffer> splitKeys) Creates a new table with an initial set of empty regions defined by the specified split keys.void
deleteColumnFamily
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, ByteBuffer column) Delete a column family from a table.List<org.apache.hadoop.hbase.thrift2.generated.TDelete>
deleteMultiple
(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TDelete> deletes) Bulk commit a List of TDeletes to the table.void
deleteNamespace
(String name) Delete an existing namespace.void
deleteSingle
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TDelete deleteSingle) Deletes as specified by the TDelete.void
deleteTable
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) Deletes a table.void
disableTable
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) Disable a tablevoid
enableTable
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) Enalbe a tableboolean
exists
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TGet get) Test for the existence of columns in the table, as specified in the TGet.existsAll
(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TGet> gets) Test for the existence of columns in the table, as specified by the TGets.org.apache.hadoop.hbase.thrift2.generated.TResult
get
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TGet get) Method for getting data from a row.List<org.apache.hadoop.hbase.thrift2.generated.THRegionLocation>
getAllRegionLocations
(ByteBuffer table) Get all of the region locations for a given table.Returns the cluster ID for this cluster.private RegionLocator
getLocator
(ByteBuffer tableName) List<org.apache.hadoop.hbase.thrift2.generated.TResult>
getMultiple
(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TGet> gets) Method for getting multiple rows.org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor
getNamespaceDescriptor
(String name) Get a namespace descriptor by name.org.apache.hadoop.hbase.thrift2.generated.THRegionLocation
getRegionLocation
(ByteBuffer table, ByteBuffer row, boolean reload) Given a table and a row get the location of the region that would contain the given row key.private ResultScanner
getScanner
(int id) Returns the Scanner associated with the specified Id.List<org.apache.hadoop.hbase.thrift2.generated.TResult>
getScannerResults
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TScan scan, int numRows) Get results for the provided TScan object.List<org.apache.hadoop.hbase.thrift2.generated.TResult>
getScannerRows
(int scannerId, int numRows) Grabs multiple rows from a Scanner.List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord>
getSlowLogResponses
(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames, org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter) Retrieves online slow RPC logs from the provided list of RegionServersprotected Table
getTable
(ByteBuffer tableName) org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor
getTableDescriptor
(org.apache.hadoop.hbase.thrift2.generated.TTableName table) Get a table descriptor.List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor>
getTableDescriptors
(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tables) Get table descriptors of tables.List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor>
Get table descriptors of tables in the given namespaceList<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor>
getTableDescriptorsByPattern
(String regex, boolean includeSysTables) Get table descriptors of tables that match the given patternList<org.apache.hadoop.hbase.thrift2.generated.TTableName>
Get table names of tables in the given namespaceList<org.apache.hadoop.hbase.thrift2.generated.TTableName>
getTableNamesByPattern
(String regex, boolean includeSysTables) Get table names of tables that match the given patternorg.apache.hadoop.hbase.thrift2.generated.TThriftServerType
Get the type of this thrift server.private org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.hadoop.hbase.thrift2.generated.TResult
increment
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TIncrement increment) private boolean
boolean
isTableAvailable
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) boolean
isTableAvailableWithSplit
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, List<ByteBuffer> splitKeys) * Use this api to check if the table has been created with the specified number of splitkeys * which was used while creating the given table.boolean
isTableDisabled
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) boolean
isTableEnabled
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor>
void
modifyColumnFamily
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor column) Modify an existing column family on a table.void
modifyNamespace
(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDesc) Modify an existing namespace.void
modifyTable
(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor desc) Modify an existing tablevoid
mutateRow
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutations) mutateRow performs multiple mutations atomically on a single row.int
openScanner
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TScan scan) Get a Scanner for the provided TScan object.void
put
(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TPut put) Commit a TPut to a table.void
putMultiple
(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TPut> puts) Commit a List of Puts to the table.protected void
removeScanner
(int id) Removes the scanner associated with the specified ID from the internal HashMap.boolean
tableExists
(org.apache.hadoop.hbase.thrift2.generated.TTableName tTableName) void
truncateTable
(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, boolean preserveSplits) Truncate a table.Methods inherited from class org.apache.hadoop.hbase.thrift.HBaseServiceHandler
getAdmin, getTable, initMetrics, setEffectiveUser
-
Field Details
-
LOG
-
nextScannerId
-
scannerMap
private final org.apache.hbase.thirdparty.com.google.common.cache.Cache<Integer,ResultScanner> scannerMap -
ioe
-
isReadOnly
-
-
Constructor Details
-
ThriftHBaseServiceHandler
public ThriftHBaseServiceHandler(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider) throws IOException - Throws:
IOException
-
-
Method Details
-
getTable
- Overrides:
getTable
in classHBaseServiceHandler
-
getLocator
-
closeTable
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
-
getTIOError
-
addScanner
Assigns a unique ID to the scanner and adds the mapping to an internal HashMap.- Parameters:
scanner
- to add- Returns:
- Id for this Scanner
-
getScanner
Returns the Scanner associated with the specified Id.- Parameters:
id
- of the Scanner to get- Returns:
- a Scanner, or null if the Id is invalid
-
removeScanner
Removes the scanner associated with the specified ID from the internal HashMap.- Parameters:
id
- of the Scanner to remove
-
exists
public boolean exists(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TGet get) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Test for the existence of columns in the table, as specified in the TGet.- Specified by:
exists
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to check onget
- the TGet to check for- Returns:
- true if the specified TGet matches one or more keys, false if not
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
existsAll
public List<Boolean> existsAll(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TGet> gets) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Test for the existence of columns in the table, as specified by the TGets. This will return an array of booleans. Each value will be true if the related Get matches one or more keys, false if not.- Specified by:
existsAll
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to check ongets
- a list of TGets to check for- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
get
public org.apache.hadoop.hbase.thrift2.generated.TResult get(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TGet get) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Method for getting data from a row. If the row cannot be found an empty Result is returned. This can be checked by the empty field of the TResult- Specified by:
get
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to get fromget
- the TGet to fetch- Returns:
- the result
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getMultiple
public List<org.apache.hadoop.hbase.thrift2.generated.TResult> getMultiple(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TGet> gets) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Method for getting multiple rows. If a row cannot be found there will be a null value in the result list for that TGet at the same position. So the Results are in the same order as the TGets.- Specified by:
getMultiple
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to get fromgets
- a list of TGets to fetch, the Result list will have the Results at corresponding positions or null if there was an error- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
put
public void put(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TPut put) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Commit a TPut to a table.- Specified by:
put
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to put data input
- the TPut to put- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
checkAndPut
public boolean checkAndPut(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, org.apache.hadoop.hbase.thrift2.generated.TPut put) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the TPut.- Specified by:
checkAndPut
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- to check in and put torow
- row to checkfamily
- column family to checkqualifier
- column qualifier to checkvalue
- the expected value, if not provided the check is for the non-existence of the column in questionput
- the TPut to put if the check succeeds- Returns:
- true if the new put was executed, false otherwise
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
putMultiple
public void putMultiple(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TPut> puts) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Commit a List of Puts to the table.- Specified by:
putMultiple
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to put data inputs
- a list of TPuts to commit- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
deleteSingle
public void deleteSingle(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TDelete deleteSingle) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Deletes as specified by the TDelete. Note: "delete" is a reserved keyword and cannot be used in Thrift thus the inconsistent naming scheme from the other functions.- Specified by:
deleteSingle
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to delete fromdeleteSingle
- the TDelete to delete- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
deleteMultiple
public List<org.apache.hadoop.hbase.thrift2.generated.TDelete> deleteMultiple(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TDelete> deletes) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Bulk commit a List of TDeletes to the table. Throws a TIOError if any of the deletes fail. Always returns an empty list for backwards compatibility.- Specified by:
deleteMultiple
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to delete fromdeletes
- list of TDeletes to delete- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
checkAndMutate
public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, org.apache.hadoop.hbase.thrift2.generated.TCompareOp compareOp, ByteBuffer value, org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutations) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Atomically checks if a row/family/qualifier value matches the expected value. If it does, it mutates the row.- Specified by:
checkAndMutate
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- to check in and delete fromrow
- row to checkfamily
- column family to checkqualifier
- column qualifier to checkcompareOp
- comparison to make on the valuevalue
- the expected value to be compared against, if not provided the check is for the non-existence of the column in questionrowMutations
- row mutations to execute if the value matches- Returns:
- true if the row was mutated, false otherwise
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
checkAndDelete
public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, ByteBuffer value, org.apache.hadoop.hbase.thrift2.generated.TDelete deleteSingle) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the delete.- Specified by:
checkAndDelete
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- to check in and delete fromrow
- row to checkfamily
- column family to checkqualifier
- column qualifier to checkvalue
- the expected value, if not provided the check is for the non-existence of the column in questiondeleteSingle
- the TDelete to execute if the check succeeds- Returns:
- true if the new delete was executed, false otherwise
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
increment
public org.apache.hadoop.hbase.thrift2.generated.TResult increment(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TIncrement increment) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException - Specified by:
increment
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
append
public org.apache.hadoop.hbase.thrift2.generated.TResult append(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TAppend append) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException - Specified by:
append
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
openScanner
public int openScanner(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TScan scan) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get a Scanner for the provided TScan object.- Specified by:
openScanner
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to get the Scanner forscan
- the scan object to get a Scanner for- Returns:
- Scanner Id to be used with other scanner procedures
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getScannerRows
public List<org.apache.hadoop.hbase.thrift2.generated.TResult> getScannerRows(int scannerId, int numRows) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.hadoop.hbase.thrift2.generated.TIllegalArgument, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Grabs multiple rows from a Scanner.- Specified by:
getScannerRows
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
scannerId
- the Id of the Scanner to return rows from. This is an Id returned from the openScanner function.numRows
- number of rows to return- Returns:
- Between zero and numRows TResults
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.hadoop.hbase.thrift2.generated.TIllegalArgument
org.apache.thrift.TException
-
getScannerResults
public List<org.apache.hadoop.hbase.thrift2.generated.TResult> getScannerResults(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TScan scan, int numRows) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get results for the provided TScan object. This helper function opens a scanner, get the results and close the scanner.- Specified by:
getScannerResults
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the table to get the Scanner forscan
- the scan object to get a Scanner fornumRows
- number of rows to return- Returns:
- between zero and numRows TResults
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
closeScanner
public void closeScanner(int scannerId) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.hadoop.hbase.thrift2.generated.TIllegalArgument, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Closes the scanner. Should be called to free server side resources timely. Typically close once the scanner is not needed anymore, i.e. after looping over it to get all the required rows.- Specified by:
closeScanner
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
scannerId
- the Id of the Scanner to close *- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.hadoop.hbase.thrift2.generated.TIllegalArgument
org.apache.thrift.TException
-
mutateRow
public void mutateRow(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutations) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
mutateRow performs multiple mutations atomically on a single row.- Specified by:
mutateRow
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- table to apply the mutationsrowMutations
- mutations to apply- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getAllRegionLocations
public List<org.apache.hadoop.hbase.thrift2.generated.THRegionLocation> getAllRegionLocations(ByteBuffer table) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get all of the region locations for a given table.- Specified by:
getAllRegionLocations
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getRegionLocation
public org.apache.hadoop.hbase.thrift2.generated.THRegionLocation getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Given a table and a row get the location of the region that would contain the given row key. reload = true means the cache will be cleared and the location will be fetched from meta.- Specified by:
getRegionLocation
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
checkReadOnlyMode
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
-
isReadOnly
-
getTableDescriptor
public org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor getTableDescriptor(org.apache.hadoop.hbase.thrift2.generated.TTableName table) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get a table descriptor.- Specified by:
getTableDescriptor
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
table
- the tablename of the table to get tableDescriptor- Returns:
- the TableDescriptor of the giving tablename
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getTableDescriptors
public List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> getTableDescriptors(List<org.apache.hadoop.hbase.thrift2.generated.TTableName> tables) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get table descriptors of tables.- Specified by:
getTableDescriptors
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tables
- the tablename list of the tables to get tableDescriptor- Returns:
- the TableDescriptor of the giving tablename
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
tableExists
public boolean tableExists(org.apache.hadoop.hbase.thrift2.generated.TTableName tTableName) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException - Specified by:
tableExists
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tTableName
- the tablename of the tables to check- Returns:
- true if table exists already, false if not
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getTableDescriptorsByPattern
public List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> getTableDescriptorsByPattern(String regex, boolean includeSysTables) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get table descriptors of tables that match the given pattern- Specified by:
getTableDescriptorsByPattern
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
regex
- The regular expression to match againstincludeSysTables
- set to false if match only against userspace tables- Returns:
- the tableDescriptors of the matching table
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getTableDescriptorsByNamespace
public List<org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor> getTableDescriptorsByNamespace(String name) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get table descriptors of tables in the given namespace- Specified by:
getTableDescriptorsByNamespace
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
name
- The namesapce's name- Returns:
- the tableDescriptors in the namespce
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getTableNamesByPattern
public List<org.apache.hadoop.hbase.thrift2.generated.TTableName> getTableNamesByPattern(String regex, boolean includeSysTables) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get table names of tables that match the given pattern- Specified by:
getTableNamesByPattern
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
regex
- The regular expression to match againstincludeSysTables
- set to false if match only against userspace tables- Returns:
- the table names of the matching table
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getTableNamesByNamespace
public List<org.apache.hadoop.hbase.thrift2.generated.TTableName> getTableNamesByNamespace(String name) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get table names of tables in the given namespace- Specified by:
getTableNamesByNamespace
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
name
- The namesapce's name- Returns:
- the table names of the matching table
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
createTable
public void createTable(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor desc, List<ByteBuffer> splitKeys) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Creates a new table with an initial set of empty regions defined by the specified split keys. The total number of regions created will be the number of split keys plus one. Synchronous operation.- Specified by:
createTable
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
desc
- table descriptor for tablesplitKeys
- rray of split keys for the initial regions of the table- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
deleteTable
public void deleteTable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Deletes a table. Synchronous operation.- Specified by:
deleteTable
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to delete- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
truncateTable
public void truncateTable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, boolean preserveSplits) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Truncate a table. Synchronous operation.- Specified by:
truncateTable
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to truncatepreserveSplits
- whether to preserve previous splits- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
enableTable
public void enableTable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Enalbe a table- Specified by:
enableTable
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to enable- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
disableTable
public void disableTable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Disable a table- Specified by:
disableTable
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to disable- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
isTableEnabled
public boolean isTableEnabled(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException - Specified by:
isTableEnabled
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to check- Returns:
- true if table is enabled, false if not
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
isTableDisabled
public boolean isTableDisabled(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException - Specified by:
isTableDisabled
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to check- Returns:
- true if table is disabled, false if not
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
isTableAvailable
public boolean isTableAvailable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException - Specified by:
isTableAvailable
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to check- Returns:
- true if table is available, false if not
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
isTableAvailableWithSplit
public boolean isTableAvailableWithSplit(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, List<ByteBuffer> splitKeys) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
* Use this api to check if the table has been created with the specified number of splitkeys * which was used while creating the given table. Note : If this api is used after a table's * region gets splitted, the api may return false. * * @return true if table is available, false if not * * @deprecated Since 2.2.0. Because the same method in Table interface has been deprecated * since 2.0.0, we will remove it in 3.0.0 release. * UseTHBaseService.Iface.isTableAvailable(TTableName tableName)
instead *- Specified by:
isTableAvailableWithSplit
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to checksplitKeys
- keys to check if the table has been created with all split keys- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
addColumnFamily
public void addColumnFamily(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor column) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Add a column family to an existing table. Synchronous operation.- Specified by:
addColumnFamily
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to add column family tocolumn
- column family descriptor of column family to be added- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
deleteColumnFamily
public void deleteColumnFamily(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, ByteBuffer column) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Delete a column family from a table. Synchronous operation.- Specified by:
deleteColumnFamily
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to delete column family fromcolumn
- name of column family to be deleted- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
modifyColumnFamily
public void modifyColumnFamily(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor column) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Modify an existing column family on a table. Synchronous operation.- Specified by:
modifyColumnFamily
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
tableName
- the tablename to modify column familycolumn
- column family descriptor of column family to be modified- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
modifyTable
public void modifyTable(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor desc) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Modify an existing table- Specified by:
modifyTable
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
desc
- the descriptor of the table to modify- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
createNamespace
public void createNamespace(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDesc) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Create a new namespace. Blocks until namespace has been successfully created or an exception is thrown- Specified by:
createNamespace
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
namespaceDesc
- descriptor which describes the new namespace- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
modifyNamespace
public void modifyNamespace(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDesc) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Modify an existing namespace. Blocks until namespace has been successfully modified or an exception is thrown- Specified by:
modifyNamespace
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
namespaceDesc
- descriptor which describes the new namespace- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
deleteNamespace
public void deleteNamespace(String name) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Delete an existing namespace. Only empty namespaces (no tables) can be removed. Blocks until namespace has been successfully deleted or an exception is thrown.- Specified by:
deleteNamespace
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
name
- namespace name- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getNamespaceDescriptor
public org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor getNamespaceDescriptor(String name) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get a namespace descriptor by name.- Specified by:
getNamespaceDescriptor
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Parameters:
name
- name of namespace descriptor- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
listNamespaces
public List<String> listNamespaces() throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException- Specified by:
listNamespaces
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Returns:
- all namespace names
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-
getThriftServerType
Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Get the type of this thrift server.- Specified by:
getThriftServerType
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Returns:
- the type of this thrift server
-
getClusterId
Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Returns the cluster ID for this cluster.- Specified by:
getClusterId
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Throws:
org.apache.thrift.TException
-
getSlowLogResponses
public List<org.apache.hadoop.hbase.thrift2.generated.TOnlineLogRecord> getSlowLogResponses(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames, org.apache.hadoop.hbase.thrift2.generated.TLogQueryFilter tLogQueryFilter) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Retrieves online slow RPC logs from the provided list of RegionServers- Specified by:
getSlowLogResponses
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Returns:
- online slowlog response list
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
- if a remote or network exception occursorg.apache.thrift.TException
-
clearSlowLogResponses
public List<Boolean> clearSlowLogResponses(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
Clears online slow/large RPC logs from the provided list of RegionServers- Specified by:
clearSlowLogResponses
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Returns:
- List of booleans representing if online slowlog response buffer is cleaned from each RegionServer
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
- if a remote or network exception occursorg.apache.thrift.TException
-
listNamespaceDescriptors
public List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor> listNamespaceDescriptors() throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException- Specified by:
listNamespaceDescriptors
in interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface
- Returns:
- all namespaces
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
-