private void cleanupIfNeeded() {
      if (status == CacheEntryStatus.INVALID && readers.get() <= 0) {
        QueryResultsCache.cleanupEntry(this);
      }
    }
A class to handle management and lookup of cached Hive query results.
ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java