@Override
public boolean fetch(String name, long blockId, int blockOffset, byte[] b, int off, int lengthToReadInBlock) {
Integer file = _names.get(name);
if (file == null) {
return false;
}
BlockCacheKey blockCacheKey = new BlockCacheKey();
blockCacheKey.setBlock(blockId);
blockCacheKey.setFile(file);
boolean fetch = _blockCache.fetch(blockCacheKey, b, blockOffset, off, lengthToReadInBlock);
if (fetch) {
_blurMetrics.blockCacheHit.incrementAndGet();
} else {
_blurMetrics.blockCacheMiss.incrementAndGet();
}
return fetch;
}