public boolean isHeapUsageBelowThreshold() {
    double total = Runtime.getRuntime().maxMemory();
    double available = Runtime.getRuntime().freeMemory();
    double usedRatio = 1d - (available / total);
    return heapUsageThreshold > usedRatio;
  }
Checks if the current heap usage is below the threshold configured by
"hbase.rs.prefetchheapusage" (0.8 by default).
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java