private void mergeFamilyMaps(Map<byte[], List<ExtendedCell>> familyMap,
      Map<byte[], List<ExtendedCell>> toBeMerged) {
      for (Map.Entry<byte[], List<ExtendedCell>> entry : toBeMerged.entrySet()) {
        List<ExtendedCell> cells = familyMap.get(entry.getKey());
        if (cells == null) {
          familyMap.put(entry.getKey(), entry.getValue());
        } else {
          cells.addAll(entry.getValue());
        }
      }
    }
Runs prePut/preDelete/preIncrement/preAppend coprocessor hook for input mutation in a batch
@param metrics Array of 2 ints. index 0: count of puts, index 1: count of deletes, index 2:
               count of increments and 3: count of appends
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java