NihalJain commented on code in PR #6435: URL: https://github.com/apache/hbase/pull/6435#discussion_r1827517444
########## hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java: ########## @@ -95,6 +109,36 @@ public static enum Counters { public void map(ImmutableBytesWritable row, Result values, Context context) throws IOException { // Count every row containing data, whether it's in qualifiers or values context.getCounter(Counters.ROWS).increment(1); + context.getCounter(Counters.CELLS).increment(values.size()); + + boolean rowContainsDeleteMarker = true; + + if (countDeleteMarkers) { + for (Cell cell : values.rawCells()) { + Cell.Type type = cell.getType(); + switch (type) { + case Delete: + context.getCounter(Counters.DELETE).increment(1); + break; + case DeleteColumn: + context.getCounter(Counters.DELETE_COLUMN).increment(1); + break; + case DeleteFamily: + context.getCounter(Counters.DELETE_FAMILY).increment(1); + break; + case DeleteFamilyVersion: + context.getCounter(Counters.DELETE_FAMILY_VERSION).increment(1); + break; + default: + rowContainsDeleteMarker = false; + break; + } + } + } + + if (rowContainsDeleteMarker) { Review Comment: this is logically incorrect right? in scenario where countDeleteMarkers is false. We will have ROWS_WITH_DELETE_MARKER count equal to number of rows -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org