@Override
      public int compare(RegionInfo r1, RegionInfo r2) {
        return Bytes.compareTo(r1.getStartKey(), r2.getStartKey());
      }
Helper method for testing async snapshot operations. Just waits for the given snapshot to
complete on the server by repeatedly checking the master.
@param master       the master running the snapshot
@param snapshot     the snapshot to check
@param timeoutNanos the timeout in nano between checks to see if the snapshot is done
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java