@Override
    public void flushRequested(FlushType type, Region region) {
      switch (type) {
        case ABOVE_ONHEAP_HIGHER_MARK:
          blockedFlushCount.incrementAndGet();
          break;
        case ABOVE_ONHEAP_LOWER_MARK:
          unblockedFlushCount.incrementAndGet();
          break;
        // Removed the counting of the offheap related flushes (after reviews). Will add later if
        // needed
        default:
          // In case of any other flush don't do any action.
          break;
      }
    }
Returns heap occupancy percentage, 0 &lt;= n &lt;= 1. or -0.0 for error asking JVM
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemoryManager.java