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.
org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader.InvalidCacheLoadException, org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader.UnsupportedLoadingOperationException
Modifier and Type | Field and Description |
---|---|
static HBaseConnectionManager |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
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) |
public static final HBaseConnectionManager INSTANCE
public org.apache.hadoop.hbase.client.Connection load(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key) throws Exception
load
in class org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader<org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey,org.apache.hadoop.hbase.client.Connection>
Exception
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)
onRemoval
in interface 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 org.apache.hadoop.hbase.client.Connection getConnection(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key)
public void closeConnection(org.apache.drill.exec.store.hbase.HBaseStoragePlugin.HBaseConnectionKey key)
Copyright © 1970 The Apache Software Foundation. All rights reserved.