private static int compareRowKeys(byte[] r1, byte[] r2) {
      if (r1 == null) {
        return 1; // source missing row
      } else if (r2 == null) {
        return -1; // target missing row
      } else {
        // Sync on no META tables only. We can directly do what CellComparator is doing inside.
        // Never the call going to MetaCellComparator.
        return Bytes.compareTo(r1, 0, r1.length, r2, 0, r2.length);
      }
    }
Compare row keys of the given Result objects. Nulls are after non-nulls
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SyncTable.java