NihalJain commented on code in PR #6435:
URL: https://github.com/apache/hbase/pull/6435#discussion_r1832545882
##########
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java:
##########
@@ -65,22 +68,42 @@ public class RowCounter extends AbstractHBaseTool {
private final static String OPT_END_TIME = "endtime";
private final static String OPT_RANGE = "range";
private final static String OPT_EXPECTED_COUNT = "expectedCount";
+ private final static String OPT_COUNT_DELETE_MARKERS = "countDeleteMarkers";
private String tableName;
private List<MultiRowRangeFilter.RowRange> rowRangeList;
private long startTime;
private long endTime;
private long expectedCount;
+ private boolean countDeleteMarkers;
private List<String> columns = new ArrayList<>();
+ private Job job;
Review Comment:
this doesnot look necessary, we have been validating counters with following
logic for existing tests. Please update tests to take a similar approach:
```
* Run the RowCounter map reduce job and verify the row count.
* @param args the command line arguments to be used for
rowcounter job.
* @param expectedCount the expected row count (result of map reduce job).
* @throws Exception in case of any unexpected error.
*/
private void runCreateSubmittableJobWithArgs(String[] args, int
expectedCount) throws Exception {
Job job = RowCounter.createSubmittableJob(TEST_UTIL.getConfiguration(),
args);
long start = EnvironmentEdgeManager.currentTime();
job.waitForCompletion(true);
long duration = EnvironmentEdgeManager.currentTime() - start;
LOG.debug("row count duration (ms): " + duration);
assertTrue(job.isSuccessful());
Counter counter =
job.getCounters().findCounter(RowCounter.RowCounterMapper.Counters.ROWS);
assertEquals(expectedCount, counter.getValue());
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]