public long align(long num) {
      // The 7 comes from that the alignSize is 8 which is the number of bytes
      // stored and sent together
      return ((num + 7) >> 3) << 3;
    }
Aligns a number to 8.
@param num number to align to 8
@return smallest number &gt;= input that is a multiple of 8
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java