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
Modifier and TypeFieldDescriptionstatic final String
protected org.apache.hadoop.conf.Configuration
protected final ConnectionCache
static final String
protected ThriftMetrics
-
Constructor Summary
ConstructorDescriptionHBaseServiceHandler
(org.apache.hadoop.conf.Configuration c, UserProvider userProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected Admin
getAdmin()
Obtain HBaseAdmin.protected Table
getTable
(byte[] tableName) Creates and returns a Table instance from a given table name.protected Table
getTable
(ByteBuffer tableName) void
initMetrics
(ThriftMetrics metrics) void
setEffectiveUser
(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
-