private static void annotateBytesRead(AttributesBuilder attributesBuilder, int directBytesRead,
    int heapBytesRead) {
    if (directBytesRead > 0) {
      attributesBuilder.put(DIRECT_BYTES_READ_KEY, directBytesRead);
    }
    if (heapBytesRead > 0) {
      attributesBuilder.put(HEAP_BYTES_READ_KEY, heapBytesRead);
    }
  }
Conditionally annotate {@code attributesBuilder} with appropriate attributes when values are
non-zero.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/util/BlockIOUtils.java