@Override
  public int evictBlocksRangeByHfileName(String hfileName, long initOffset, long endOffset) {
    fileNotFullyCached(hfileName);
    Set<BlockCacheKey> keySet = getAllCacheKeysForFile(hfileName, initOffset, endOffset);
    LOG.debug("found {} blocks for file {}, starting offset: {}, end offset: {}", keySet.size(),
      hfileName, initOffset, endOffset);
    int numEvicted = 0;
    for (BlockCacheKey key : keySet) {
      if (evictBlock(key)) {
        ++numEvicted;
      }
    }
    return numEvicted;
  }
Evicts all blocks for a specific HFile.
<p>
This is used for evict-on-close to remove all blocks of a specific HFile.
@return the number of blocks evicted
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java