private void cleanRawStore() {
    Long threadId = this.getId();
    RawStore threadLocalRawStore = threadRawStoreMap.get(threadId);
    if (threadLocalRawStore != null) {
      LOG.debug("RawStore: " + threadLocalRawStore + ", for the thread: " +
          this.getName()  +  " will be closed now.");
      threadLocalRawStore.shutdown();
      threadRawStoreMap.remove(threadId);
    }
  }
Add any Thread specific garbage cleanup code here.
Currently, it shuts down the RawStore object for this thread if it is not null.
service/src/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java