@Override
    protected void map(ImmutableBytesWritable key, Result value, Context context)
      throws IOException, InterruptedException {
      try {
        // first, finish any hash batches that end before the scanned row
        while (nextSourceKey != null && key.compareTo(nextSourceKey) >= 0) {
          moveToNextBatch(context);
        }

        // next, add the scanned row (as long as we've reached the first batch)
        if (targetHasher.isBatchStarted()) {
          targetHasher.hashResult(value);
        }
      } catch (Throwable t) {
        mapperException = t;
        throw t;
      }
    }
Attempt to read the next source key/hash pair. If there are no more, set nextSourceKey to
null
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SyncTable.java