Package org.apache.hadoop.hbase.thrift
Class HBaseServiceHandler
java.lang.Object
org.apache.hadoop.hbase.thrift.HBaseServiceHandler
- Direct Known Subclasses:
ThriftHBaseServiceHandler,ThriftHBaseServiceHandler
abstract class for HBase handler providing a Connection cache and get table/admin method
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected org.apache.hadoop.conf.Configurationprotected final ConnectionCachestatic final Stringprotected ThriftMetrics -
Constructor Summary
ConstructorsConstructorDescriptionHBaseServiceHandler(org.apache.hadoop.conf.Configuration c, UserProvider userProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected AdmingetAdmin()Obtain HBaseAdmin.protected TablegetTable(byte[] tableName) Creates and returns a Table instance from a given table name.protected TablegetTable(ByteBuffer tableName) voidinitMetrics(ThriftMetrics metrics) voidsetEffectiveUser(String effectiveUser)
-
Field Details
-
CLEANUP_INTERVAL
- See Also:
-
MAX_IDLETIME
- See Also:
-
conf
-
connectionCache
-
metrics
-
-
Constructor Details
-
HBaseServiceHandler
public HBaseServiceHandler(org.apache.hadoop.conf.Configuration c, UserProvider userProvider) throws IOException - Throws:
IOException
-
-
Method Details
-
initMetrics
-
setEffectiveUser
-
getAdmin
Obtain HBaseAdmin. Creates the instance if it is not already created.- Throws:
IOException
-
getTable
Creates and returns a Table instance from a given table name. name of table- Returns:
- Table object
- Throws:
IOException- if getting the table fails
-
getTable
- Throws:
IOException
-