public static HFileContext cloneContext(HFileContext context) {
    HFileContext newContext = new HFileContextBuilder().withBlockSize(context.getBlocksize())
      .withBytesPerCheckSum(0).withChecksumType(ChecksumType.NULL) // no checksums in cached data
      .withCompression(context.getCompression())
      .withDataBlockEncoding(context.getDataBlockEncoding())
      .withHBaseCheckSum(context.isUseHBaseChecksum()).withCompressTags(context.isCompressTags())
      .withIncludesMvcc(context.isIncludesMvcc()).withIncludesTags(context.isIncludesTags())
      .withColumnFamily(context.getColumnFamily()).withTableName(context.getTableName()).build();
    return newContext;
  }
Similarly to HFileBlock.Writer.getBlockForCaching(), creates a HFileBlock instance without
checksum for caching. This is needed for when we cache blocks via readers (either prefetch or
client read), otherwise we may fail equality comparison when checking against same block that
may already have been cached at write time.
@param cacheConf the related CacheConfig object.
@param block     the HFileBlock instance to be converted.
@return the resulting HFileBlock instance without checksum.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java