@Override
    protected void map(ImmutableBytesWritable key, Result value, Context context)
      throws IOException, InterruptedException {

      if (currentRow == null || !currentRow.equals(key)) {
        currentRow = new ImmutableBytesWritable(key); // not immutable

        if (hasher.getBatchSize() >= targetBatchSize) {
          hasher.finishBatch();
          context.write(hasher.getBatchStartKey(), hasher.getBatchHash());
          hasher.startBatch(currentRow);
        }
      }

      hasher.hashResult(value);
    }
Get the current hash
@return the current hash or null if there is no current hash
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HashTable.java