public long getSize() {
    Lock readLock = rwLock.readLock();
    try {
      readLock.lock();
      return cacheSize;
    } finally {
      readLock.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