private static void cleanupRawStore() { try { RawStore rs = HMSHandler.getRawStore(); if (rs != null) { HMSHandler.logAndAudit("Cleaning up thread local RawStore..."); rs.shutdown(); } } finally { HMSHandler handler = HMSHandler.threadLocalHMSHandler.get(); if (handler != null) { handler.notifyMetaListenersOnShutDown(); } HMSHandler.threadLocalHMSHandler.remove(); HMSHandler.threadLocalConf.remove(); HMSHandler.threadLocalModifiedConfig.remove(); HMSHandler.removeRawStore(); HMSHandler.logAndAudit("Done cleaning up thread local RawStore"); } }
/** * Cache the ThreadLocal RawStore object. Called from the corresponding thread. */ public void cacheThreadLocalRawStore() { Long threadId = this.getId(); RawStore threadLocalRawStore = HiveMetaStore.HMSHandler.getRawStore(); if (threadLocalRawStore == null) { LOG.debug("Thread Local RawStore is null, for the thread: " + this.getName() + " and so removing entry from threadRawStoreMap."); threadRawStoreMap.remove(threadId); } else { LOG.debug("Adding RawStore: " + threadLocalRawStore + ", for the thread: " + this.getName() + " to threadRawStoreMap for future cleanup."); threadRawStoreMap.put(threadId, threadLocalRawStore); } } }
/** * Cache the ThreadLocal RawStore object. Called from the corresponding thread. */ public void cacheThreadLocalRawStore() { Long threadId = this.getId(); RawStore threadLocalRawStore = HiveMetaStore.HMSHandler.getRawStore(); if (threadLocalRawStore != null && !threadRawStoreMap.containsKey(threadId)) { LOG.debug("Adding RawStore: " + threadLocalRawStore + ", for the thread: " + this.getName() + " to threadRawStoreMap for future cleanup."); threadRawStoreMap.put(threadId, threadLocalRawStore); } } }
private static void cleanupRawStore() { try { RawStore rs = HMSHandler.getRawStore(); if (rs != null) { HMSHandler.logInfo("Cleaning up thread local RawStore..."); rs.shutdown(); } } finally { HMSHandler handler = HMSHandler.threadLocalHMSHandler.get(); if (handler != null) { handler.notifyMetaListenersOnShutDown(); } HMSHandler.threadLocalHMSHandler.remove(); HMSHandler.threadLocalConf.remove(); HMSHandler.threadLocalModifiedConfig.remove(); HMSHandler.removeRawStore(); HMSHandler.logInfo("Done cleaning up thread local RawStore"); } }
/** * Cache the ThreadLocal RawStore object. Called from the corresponding thread. */ public void cacheThreadLocalRawStore() { Long threadId = this.getId(); RawStore threadLocalRawStore = HiveMetaStore.HMSHandler.getRawStore(); if (threadLocalRawStore != null && !threadRawStoreMap.containsKey(threadId)) { LOG.debug("Adding RawStore: " + threadLocalRawStore + ", for the thread: " + this.getName() + " to threadRawStoreMap for future cleanup."); threadRawStoreMap.put(threadId, threadLocalRawStore); } } }
/** * Cache the ThreadLocal RawStore object. Called from the corresponding thread. */ public void cacheThreadLocalRawStore() { Long threadId = this.getId(); RawStore threadLocalRawStore = HiveMetaStore.HMSHandler.getRawStore(); if (threadLocalRawStore != null && !threadRawStoreMap.containsKey(threadId)) { LOG.debug("Adding RawStore: " + threadLocalRawStore + ", for the thread: " + this.getName() + " to threadRawStoreMap for future cleanup."); threadRawStoreMap.put(threadId, threadLocalRawStore); } } }
/** * Cache the ThreadLocal RawStore object. Called from the corresponding thread. */ public void cacheThreadLocalRawStore() { Long threadId = this.getId(); RawStore threadLocalRawStore = HiveMetaStore.HMSHandler.getRawStore(); if (threadLocalRawStore != null && !threadRawStoreMap.containsKey(threadId)) { LOG.debug("Adding RawStore: " + threadLocalRawStore + ", for the thread: " + this.getName() + " to threadRawStoreMap for future cleanup."); threadRawStoreMap.put(threadId, threadLocalRawStore); } } }
/** * Cache the ThreadLocal RawStore object. Called from the corresponding thread. */ public void cacheThreadLocalRawStore() { Long threadId = this.getId(); RawStore threadLocalRawStore = HiveMetaStore.HMSHandler.getRawStore(); if (threadLocalRawStore != null && !threadRawStoreMap.containsKey(threadId)) { LOG.debug("Adding RawStore: " + threadLocalRawStore + ", for the thread: " + this.getName() + " to threadRawStoreMap for future cleanup."); threadRawStoreMap.put(threadId, threadLocalRawStore); } } }