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
Nested ClassesModifier and TypeClassDescriptionprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final IOExceptionprivate booleanprivate static final org.slf4j.Loggerprivate final AtomicIntegerprivate 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
ConstructorsConstructorDescriptionThriftHBaseServiceHandler(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnFamily(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 intaddScanner(ResultScanner scanner) Assigns a unique ID to the scanner and adds the mapping to an internal HashMap.org.apache.hadoop.hbase.thrift2.generated.TResultappend(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TAppend append) booleancheckAndDelete(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.booleancheckAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, org.apache.hadoop.hbase.thrift2.generated.TCompareOperator compareOp, ByteBuffer value, org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutations) Atomically checks if a row/family/qualifier value matches the expected value.booleancheckAndPut(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 voidclearSlowLogResponses(Set<org.apache.hadoop.hbase.thrift2.generated.TServerName> tServerNames) Clears online slow/large RPC logs from the provided list of RegionServersvoidcloseScanner(int scannerId) Closes the scanner.private voidcloseTable(Table table) voidcreateNamespace(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDesc) Create a new namespace.voidcreateTable(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.voiddeleteColumnFamily(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.voiddeleteNamespace(String name) Delete an existing namespace.voiddeleteSingle(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TDelete deleteSingle) Deletes as specified by the TDelete.voiddeleteTable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) Deletes a table.voiddisableTable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) Disable a tablevoidenableTable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) Enalbe a tablebooleanexists(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.TResultget(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 RegionLocatorgetLocator(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.TNamespaceDescriptorgetNamespaceDescriptor(String name) Get a namespace descriptor by name.org.apache.hadoop.hbase.thrift2.generated.THRegionLocationgetRegionLocation(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 ResultScannergetScanner(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 TablegetTable(ByteBuffer tableName) org.apache.hadoop.hbase.thrift2.generated.TTableDescriptorgetTableDescriptor(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.TThriftServerTypeGet the type of this thrift server.private org.apache.hadoop.hbase.thrift2.generated.TIOErrorbooleangrant(org.apache.hadoop.hbase.thrift2.generated.TAccessControlEntity info) Grant permissions in table or namespace level.org.apache.hadoop.hbase.thrift2.generated.TResultincrement(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TIncrement increment) private booleanbooleanisTableAvailable(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) booleanisTableDisabled(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) booleanisTableEnabled(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName) List<org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor>voidmodifyColumnFamily(org.apache.hadoop.hbase.thrift2.generated.TTableName tableName, org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor column) Modify an existing column family on a table.voidmodifyNamespace(org.apache.hadoop.hbase.thrift2.generated.TNamespaceDescriptor namespaceDesc) Modify an existing namespace.voidmodifyTable(org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor desc) Modify an existing tablevoidmutateRow(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TRowMutations rowMutations) mutateRow performs multiple mutations atomically on a single row.intopenScanner(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TScan scan) Get a Scanner for the provided TScan object.voidput(ByteBuffer table, org.apache.hadoop.hbase.thrift2.generated.TPut put) Commit a TPut to a table.voidputMultiple(ByteBuffer table, List<org.apache.hadoop.hbase.thrift2.generated.TPut> puts) Commit a List of Puts to the table.protected voidremoveScanner(int id) Removes the scanner associated with the specified ID from the internal HashMap.booleanrevoke(org.apache.hadoop.hbase.thrift2.generated.TAccessControlEntity info) Revoke permissions in table or namespace level.booleantableExists(org.apache.hadoop.hbase.thrift2.generated.TTableName tTableName) voidtruncateTable(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:
getTablein 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.IfaceTest for the existence of columns in the table, as specified in the TGet.- Specified by:
existsin 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.TIOErrororg.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.IfaceTest 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:
existsAllin 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.TIOErrororg.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.IfaceMethod 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:
getin 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.TIOErrororg.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.IfaceMethod 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:
getMultiplein 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.TIOErrororg.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.IfaceCommit a TPut to a table.- Specified by:
putin 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.TIOErrororg.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.IfaceAtomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the TPut.- Specified by:
checkAndPutin 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.TIOErrororg.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.IfaceCommit a List of Puts to the table.- Specified by:
putMultiplein 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.TIOErrororg.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.IfaceDeletes 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:
deleteSinglein 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.TIOErrororg.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.IfaceBulk 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:
deleteMultiplein 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.TIOErrororg.apache.thrift.TException
-
checkAndMutate
public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family, ByteBuffer qualifier, org.apache.hadoop.hbase.thrift2.generated.TCompareOperator 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.IfaceAtomically checks if a row/family/qualifier value matches the expected value. If it does, it mutates the row.- Specified by:
checkAndMutatein 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.TIOErrororg.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.IfaceAtomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the delete.- Specified by:
checkAndDeletein 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.TIOErrororg.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:
incrementin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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:
appendin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceGet a Scanner for the provided TScan object.- Specified by:
openScannerin 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.TIOErrororg.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.IfaceGrabs multiple rows from a Scanner.- Specified by:
getScannerRowsin 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.TIOErrororg.apache.hadoop.hbase.thrift2.generated.TIllegalArgumentorg.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.IfaceGet results for the provided TScan object. This helper function opens a scanner, get the results and close the scanner.- Specified by:
getScannerResultsin 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.TIOErrororg.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.IfaceCloses 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:
closeScannerin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
scannerId- the Id of the Scanner to close *- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.apache.hadoop.hbase.thrift2.generated.TIllegalArgumentorg.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.IfacemutateRow performs multiple mutations atomically on a single row.- Specified by:
mutateRowin 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.TIOErrororg.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.IfaceGet all of the region locations for a given table.- Specified by:
getAllRegionLocationsin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceGiven 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:
getRegionLocationin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceGet a table descriptor.- Specified by:
getTableDescriptorin 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.TIOErrororg.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.IfaceGet table descriptors of tables.- Specified by:
getTableDescriptorsin 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.TIOErrororg.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:
tableExistsin 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.TIOErrororg.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.IfaceGet table descriptors of tables that match the given pattern- Specified by:
getTableDescriptorsByPatternin 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.TIOErrororg.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.IfaceGet table descriptors of tables in the given namespace- Specified by:
getTableDescriptorsByNamespacein 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.TIOErrororg.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.IfaceGet table names of tables that match the given pattern- Specified by:
getTableNamesByPatternin 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.TIOErrororg.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.IfaceGet table names of tables in the given namespace- Specified by:
getTableNamesByNamespacein 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.TIOErrororg.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.IfaceCreates 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:
createTablein 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.TIOErrororg.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.IfaceDeletes a table. Synchronous operation.- Specified by:
deleteTablein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
tableName- the tablename to delete- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceTruncate a table. Synchronous operation.- Specified by:
truncateTablein 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.TIOErrororg.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.IfaceEnalbe a table- Specified by:
enableTablein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
tableName- the tablename to enable- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceDisable a table- Specified by:
disableTablein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
tableName- the tablename to disable- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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:
isTableEnabledin 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.TIOErrororg.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:
isTableDisabledin 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.TIOErrororg.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:
isTableAvailablein 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.TIOErrororg.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.IfaceAdd a column family to an existing table. Synchronous operation.- Specified by:
addColumnFamilyin 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.TIOErrororg.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.IfaceDelete a column family from a table. Synchronous operation.- Specified by:
deleteColumnFamilyin 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.TIOErrororg.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.IfaceModify an existing column family on a table. Synchronous operation.- Specified by:
modifyColumnFamilyin 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.TIOErrororg.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.IfaceModify an existing table- Specified by:
modifyTablein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
desc- the descriptor of the table to modify- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceCreate a new namespace. Blocks until namespace has been successfully created or an exception is thrown- Specified by:
createNamespacein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
namespaceDesc- descriptor which describes the new namespace- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceModify an existing namespace. Blocks until namespace has been successfully modified or an exception is thrown- Specified by:
modifyNamespacein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
namespaceDesc- descriptor which describes the new namespace- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceDelete 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:
deleteNamespacein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
name- namespace name- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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.IfaceGet a namespace descriptor by name.- Specified by:
getNamespaceDescriptorin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Parameters:
name- name of namespace descriptor- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.apache.thrift.TException
-
listNamespaces
public List<String> listNamespaces() throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException- Specified by:
listNamespacesin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Returns:
- all namespace names
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.apache.thrift.TException
-
getThriftServerType
Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.IfaceGet the type of this thrift server.- Specified by:
getThriftServerTypein 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.IfaceReturns the cluster ID for this cluster.- Specified by:
getClusterIdin 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.IfaceRetrieves online slow RPC logs from the provided list of RegionServers- Specified by:
getSlowLogResponsesin 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.IfaceClears online slow/large RPC logs from the provided list of RegionServers- Specified by:
clearSlowLogResponsesin 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
-
grant
public boolean grant(org.apache.hadoop.hbase.thrift2.generated.TAccessControlEntity info) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.IfaceGrant permissions in table or namespace level.- Specified by:
grantin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.apache.thrift.TException
-
revoke
public boolean revoke(org.apache.hadoop.hbase.thrift2.generated.TAccessControlEntity info) throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException Description copied from interface:org.apache.hadoop.hbase.thrift2.generated.THBaseService.IfaceRevoke permissions in table or namespace level.- Specified by:
revokein interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.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:
listNamespaceDescriptorsin interfaceorg.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface- Returns:
- all namespaces
- Throws:
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.apache.thrift.TException
-