public void notifyTableChanged(String dbName, String tableName, long updateTime) {
    LOG.debug("Table changed: {}.{}, at {}", dbName, tableName, updateTime);
    // Invalidate all cache entries using this table.
    List<CacheEntry> entriesToInvalidate = null;
    rwLock.writeLock().lock();
    try {
      String key = (dbName.toLowerCase() + "." + tableName.toLowerCase());
      Set<CacheEntry> entriesForTable = tableToEntryMap.get(key);
      if (entriesForTable != null) {
        // Possible concurrent modification issues if we try to remove cache entries while
        // traversing the cache structures. Save the entries to remove in a separate list.
        entriesToInvalidate = new ArrayList<>(entriesForTable);
      }
      if (entriesToInvalidate != null) {
        for (CacheEntry entry : entriesToInvalidate) {
          // Ignore updates that occured before this cached query was created.
          if (entry.getQueryInfo().getQueryTime() <= updateTime) {
            removeEntry(entry);
          }
        }
      }
    } finally {
      rwLock.writeLock().unlock();
    }
  }
Updates a pending cache entry with a FetchWork result from a finished query.
If successful the cache entry will be set to valid status and be usable for cached queries.
Important: Adding the entry to the cache will increment the reader count for the cache entry.
CacheEntry.releaseReader() should be called when the caller is done with the cache entry.
@param cacheEntry
@param fetchWork
@return
ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java