public static void resetCacheConfig(Configuration conf) {
    conf.setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, HConstants.HFILE_BLOCK_CACHE_SIZE_DEFAULT);
    conf.setFloat(HConstants.BUCKET_CACHE_SIZE_KEY, 0f);
    conf.unset(HConstants.BUCKET_CACHE_IOENGINE_KEY);
  }
Enable a basic on-heap cache for these jobs. Any BlockCache implementation based on direct
memory will likely cause the map tasks to OOM when opening the region. This is done here
instead of in TableSnapshotRegionRecordReader in case an advanced user wants to override this
behavior in their job.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java