Tabnine Logo
HiveClientCache$CacheableHiveMetaStoreClient
Code IndexAdd Tabnine to your IDE (free)

How to use
HiveClientCache$CacheableHiveMetaStoreClient
in
org.apache.hive.hcatalog.common

Best Java code snippets using org.apache.hive.hcatalog.common.HiveClientCache$CacheableHiveMetaStoreClient (Showing top 16 results out of 315)

origin: apache/hive

 /**
  * GC is attempting to destroy the object.
  * No one references this client anymore, so it can be torn down without worrying about user counts.
  * @throws Throwable
  */
 @Override
 protected void finalize() throws Throwable {
  if (users.get() != 0) {
   LOG.warn("Closing client with non-zero user count: users=" + users.get() + " expired=" + expiredFromCache);
  }
  try {
   this.tearDown();
  } finally {
   super.finalize();
  }
 }
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

 /**
  * GC is attempting to destroy the object.
  * No one references this client anymore, so it can be torn down without worrying about user counts.
  * @throws Throwable
  */
 @Override
 protected void finalize() throws Throwable {
  if (users.get() != 0) {
   LOG.warn("Closing client with non-zero user count: users=" + users.get() + " expired=" + expiredFromCache);
  }
  try {
   this.tearDown();
  } finally {
   super.finalize();
  }
 }
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

/**
 * Attempt to tear down the client connection.
 * The connection will be closed if the following conditions hold:
 *  1. There are no active user holding the client.
 *  2. The client has been evicted from the cache.
 */
public synchronized void tearDownIfUnused() {
 if (users.get() != 0) {
  LOG.warn("Non-zero user count preventing client tear down: users=" + users.get() + " expired=" + expiredFromCache);
 }
 if (users.get() == 0 && expiredFromCache) {
  this.tearDown();
 }
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

/**
 * Tear down only if
 *  1. There are no active user
 *  2. It has expired from the cache
 */
public void tearDownIfUnused() {
 if (users.get() == 0 && expiredFromCache) {
  this.tearDown();
 }
}
origin: com.facebook.presto.hive/hive-apache

/**
 * Tear down only if
 *  1. There are no active user
 *  2. It has expired from the cache
 */
public void tearDownIfUnused() {
 if (users.get() == 0 && expiredFromCache) {
  this.tearDown();
 }
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

/**
 * Decrement the user count and piggyback this to set expiry flag as well, then  teardown(), if conditions are met.
 * This *MUST* be called by anyone who uses this client.
 */
@Override
public synchronized void close() {
 release();
 tearDownIfUnused();
}
origin: com.facebook.presto.hive/hive-apache

 /**
  * Last effort to clean up, may not even get called.
  * @throws Throwable
  */
 @Override
 protected void finalize() throws Throwable {
  try {
   this.tearDown();
  } finally {
   super.finalize();
  }
 }
}
origin: com.facebook.presto.hive/hive-apache

/**
 * Decrement the user count and piggyback this to set expiry flag as well, then  teardown(), if conditions are met.
 * This *MUST* be called by anyone who uses this client.
 */
@Override
public void close() {
 release();
 if (System.currentTimeMillis() >= expiryTime)
  setExpiredFromCache();
 tearDownIfUnused();
}
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

 /**
  * Last effort to clean up, may not even get called.
  * @throws Throwable
  */
 @Override
 protected void finalize() throws Throwable {
  try {
   this.tearDown();
  } finally {
   super.finalize();
  }
 }
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

 /**
  * Last effort to clean up, may not even get called.
  * @throws Throwable
  */
 @Override
 protected void finalize() throws Throwable {
  try {
   this.tearDown();
  } finally {
   super.finalize();
  }
 }
}
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

/**
 * Tear down only if
 *  1. There are no active user
 *  2. It has expired from the cache
 */
public void tearDownIfUnused() {
 if (users.get() == 0 && expiredFromCache) {
  this.tearDown();
 }
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

/**
 * Decrement the user count and piggyback this to set expiry flag as well, then  teardown(), if conditions are met.
 * This *MUST* be called by anyone who uses this client.
 */
@Override
public void close() {
 release();
 if (System.currentTimeMillis() >= expiryTime)
  setExpiredFromCache();
 tearDownIfUnused();
}
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

/**
 * Decrement the user count and piggyback this to set expiry flag as well, then  teardown(), if conditions are met.
 * This *MUST* be called by anyone who uses this client.
 */
@Override
public void close() {
 release();
 if (System.currentTimeMillis() >= expiryTime)
  setExpiredFromCache();
 tearDownIfUnused();
}
origin: apache/hive

  (HiveClientCache.CacheableHiveMetaStoreClient) cache.get(metaServer.getHiveConf());
assertTrue(client.isOpen());
 client.dropTable(DB_NAME, LONG_TABLE_NAME);
} catch (Exception e) {
 client.dropDatabase(DB_NAME);
} catch (Exception e) {
client.createDatabase(new Database(DB_NAME, "", null, null));
 client.createTable(tbl);
 fail("Exception was expected while creating table with long name");
} catch (Exception e) {
assertFalse(client.isOpen());
metaServer.shutDown();
origin: apache/hive

/**
 * Attempt to tear down the client connection.
 * The connection will be closed if the following conditions hold:
 *  1. There are no active user holding the client.
 *  2. The client has been evicted from the cache.
 */
public synchronized void tearDownIfUnused() {
 if (users.get() != 0) {
  LOG.warn("Non-zero user count preventing client tear down: users=" + users.get() + " expired=" + expiredFromCache);
 }
 if (users.get() == 0 && expiredFromCache) {
  this.tearDown();
 }
}
origin: apache/hive

/**
 * Decrement the user count and piggyback this to set expiry flag as well, then  teardown(), if conditions are met.
 * This *MUST* be called by anyone who uses this client.
 */
@Override
public synchronized void close() {
 release();
 tearDownIfUnused();
}
org.apache.hive.hcatalog.commonHiveClientCache$CacheableHiveMetaStoreClient

Javadoc

Add # of current users on HiveMetaStoreClient, so that the client can be cleaned when no one is using it.

Most used methods

  • release
    Decrements the user count.
  • tearDown
    Close if not closed already
  • tearDownIfUnused
    Tear down only if 1. There are no active user 2. It has expired from the cache
  • setExpiredFromCache
    Communicate to the client that it is no longer in the cache. The expiration time should be voided to
  • createDatabase
  • createTable
  • dropDatabase
  • dropTable
  • isOpen
    Make a call to hive meta store and see if the client is still usable. Some calls where the user prov

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ImageIO (javax.imageio)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now