Class CachedClientPool

  • All Implemented Interfaces:
    org.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException>

    public class CachedClientPool
    extends java.lang.Object
    implements org.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException>
    A ClientPool that caches the underlying HiveClientPool instances.

    The following key elements are supported and can be specified via CatalogProperties.CLIENT_POOL_CACHE_KEYS:

    • ugi - the Hadoop UserGroupInformation instance that represents the current user using the cache.
    • user_name - similar to UGI but only includes the user's name determined by UserGroupInformation#getUserName.
    • conf - name of an arbitrary configuration. The value of the configuration will be extracted from catalog properties and added to the cache key. A conf element should start with a "conf:" prefix which is followed by the configuration name. E.g. specifying "conf:a.b.c" will add "a.b.c" to the key, and so that configurations with different default catalog wouldn't share the same client pool. Multiple conf elements can be specified.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.iceberg.ClientPool

        org.apache.iceberg.ClientPool.Action<R extends java.lang.Object,​C extends java.lang.Object,​E extends java.lang.Exception>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <R> R run​(org.apache.iceberg.ClientPool.Action<R,​org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException> action)  
      <R> R run​(org.apache.iceberg.ClientPool.Action<R,​org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException> action, boolean retry)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • run

        public <R> R run​(org.apache.iceberg.ClientPool.Action<R,​org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException> action)
                  throws org.apache.thrift.TException,
                         java.lang.InterruptedException
        Specified by:
        run in interface org.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException>
        Throws:
        org.apache.thrift.TException
        java.lang.InterruptedException
      • run

        public <R> R run​(org.apache.iceberg.ClientPool.Action<R,​org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException> action,
                         boolean retry)
                  throws org.apache.thrift.TException,
                         java.lang.InterruptedException
        Specified by:
        run in interface org.apache.iceberg.ClientPool<org.apache.hadoop.hive.metastore.IMetaStoreClient,​org.apache.thrift.TException>
        Throws:
        org.apache.thrift.TException
        java.lang.InterruptedException