@Override
    public void handleCacheCollision(DataCache cacheWrapper, MemoryBuffer replacementBuffer,
        List<MemoryBuffer> cacheBuffers) {
      assert originalCbIndex >= 0;
      // Had the put succeeded for our new buffer, it would have refcount of 2 - 1 from put,
      // and 1 from notifyReused call above. "Old" buffer now has the 1 from put; new buffer
      // is not in cache. releaseBuffer will decref the buffer, and also deallocate.
      cacheWrapper.releaseBuffer(this.buffer);
      cacheWrapper.reuseBuffer(replacementBuffer);
      // Replace the buffer in our big range list, as well as in current results.
      this.buffer = replacementBuffer;
      cacheBuffers.set(originalCbIndex, replacementBuffer);
      originalCbIndex = -1; // This can only happen once at decompress time.
    }
CacheChunk that is pre-created for new cache data; initially, it contains an original disk
buffer and an unallocated MemoryBuffer object. Before we expose it, the MB is allocated,
the data is decompressed, and original compressed data is discarded. The chunk lives on in
the DiskRange list created for the request, and everyone treats it like regular CacheChunk.
ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java