|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.ConnectionCache
@InterfaceAudience.Private public class ConnectionCache
A utility to store user specific HConnections in memory. There is a chore to clean up connections idle for too long. This class is used by REST server and Thrift server to support authentication and impersonation.
Constructor Summary | |
---|---|
ConnectionCache(org.apache.hadoop.conf.Configuration conf,
UserProvider userProvider,
int cleanInterval,
int maxIdleTime)
|
Method Summary | |
---|---|
HBaseAdmin |
getAdmin()
Caller doesn't close the admin afterwards. |
String |
getEffectiveUser()
Get the current thread local effective user |
HTableInterface |
getTable(String tableName)
Caller closes the table afterwards. |
void |
setEffectiveUser(String user)
Set the current thread local effective user |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionCache(org.apache.hadoop.conf.Configuration conf, UserProvider userProvider, int cleanInterval, int maxIdleTime) throws IOException
IOException
Method Detail |
---|
public void setEffectiveUser(String user)
public String getEffectiveUser()
public HBaseAdmin getAdmin() throws IOException
IOException
public HTableInterface getTable(String tableName) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |