Class HBaseConnectionManager
java.lang.Object
org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey,org.apache.hadoop.hbase.client.Connection>
org.apache.drill.exec.store.hbase.HBaseConnectionManager
- All Implemented Interfaces:
org.apache.drill.shaded.guava.com.google.common.cache.RemovalListener<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey,
org.apache.hadoop.hbase.client.Connection>
public final class HBaseConnectionManager
extends org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey,org.apache.hadoop.hbase.client.Connection>
implements org.apache.drill.shaded.guava.com.google.common.cache.RemovalListener<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey,org.apache.hadoop.hbase.client.Connection>
A singleton class which manages the lifecycle of HBase connections.
One connection per storage plugin instance is maintained.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader
org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader.InvalidCacheLoadException, org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader.UnsupportedLoadingOperationException
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closeConnection
(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key) org.apache.hadoop.hbase.client.Connection
getConnection
(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key) org.apache.hadoop.hbase.client.Connection
load
(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key) void
onRemoval
(org.apache.drill.shaded.guava.com.google.common.cache.RemovalNotification<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey, org.apache.hadoop.hbase.client.Connection> notification) Methods inherited from class org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader
asyncReloading, from, from, loadAll, reload
-
Field Details
-
INSTANCE
-
-
Method Details
-
load
public org.apache.hadoop.hbase.client.Connection load(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key) throws Exception - Specified by:
load
in classorg.apache.drill.shaded.guava.com.google.common.cache.CacheLoader<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey,
org.apache.hadoop.hbase.client.Connection> - Throws:
Exception
-
onRemoval
public void onRemoval(org.apache.drill.shaded.guava.com.google.common.cache.RemovalNotification<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey, org.apache.hadoop.hbase.client.Connection> notification) - Specified by:
onRemoval
in interfaceorg.apache.drill.shaded.guava.com.google.common.cache.RemovalListener<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey,
org.apache.hadoop.hbase.client.Connection>
-
getConnection
public org.apache.hadoop.hbase.client.Connection getConnection(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key) -
closeConnection
public void closeConnection(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key)
-