public static IOPrepareCache get() {
    IOPrepareCache cache = IOPrepareCache.threadLocalIOPrepareCache.get();
    if (cache == null) {
      threadLocalIOPrepareCache.set(new IOPrepareCache());
      cache = IOPrepareCache.threadLocalIOPrepareCache.get();
    }

    return cache;
  }
IOPrepareCache is used to cache pre-query io-related objects.
It should be cleared every time a new query issued.
ql/src/java/org/apache/hadoop/hive/ql/io/IOPrepareCache.java