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

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    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)
     

    Methods inherited from class org.apache.drill.shaded.guava.com.google.common.cache.CacheLoader

    asyncReloading, from, from, loadAll, reload

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 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>
      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 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>
    • 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)