@InterfaceAudience.Private public class ConnectionCache extends Object
| Constructor and Description |
|---|
ConnectionCache(org.apache.hadoop.conf.Configuration conf,
UserProvider userProvider,
int cleanInterval,
int maxIdleTime) |
| Modifier and Type | Method and Description |
|---|---|
Admin |
getAdmin()
Caller doesn't close the admin afterwards.
|
String |
getClusterId()
Returns Cluster ID for the HBase cluster or null if there is an err making the connection.
|
String |
getEffectiveUser()
Get the current thread local effective user
|
RegionLocator |
getRegionLocator(byte[] tableName)
Retrieve a regionLocator for the table.
|
Table |
getTable(String tableName)
Caller closes the table afterwards.
|
void |
setEffectiveUser(String user)
Set the current thread local effective user
|
void |
shutdown()
Called when cache is no longer needed so that it can perform cleanup operations
|
boolean |
updateConnectionAccessTime()
Updates the access time for the current connection.
|
public ConnectionCache(org.apache.hadoop.conf.Configuration conf,
UserProvider userProvider,
int cleanInterval,
int maxIdleTime)
throws IOException
IOExceptionpublic void setEffectiveUser(String user)
public String getEffectiveUser()
public void shutdown()
public Admin getAdmin() throws IOException
IOExceptionpublic Table getTable(String tableName) throws IOException
IOExceptionpublic RegionLocator getRegionLocator(byte[] tableName) throws IOException
IOExceptionpublic boolean updateConnectionAccessTime()
public String getClusterId()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.