private void validateCounterCounts(Counters counters, long rowCount,
    long rowsWithDeleteMarkersCount, long deleteCount, long deleteColumnCount,
    long deleteFamilyCount, long deleteFamilyVersionCount) {

    long actualRowCount =
      counters.findCounter(RowCounter.RowCounterMapper.Counters.ROWS).getValue();
    long actualRowsWithDeleteMarkersCount =
      counters.findCounter(RowCounter.RowCounterMapper.Counters.ROWS_WITH_DELETE_MARKER).getValue();
    long actualDeleteCount =
      counters.findCounter(RowCounter.RowCounterMapper.Counters.DELETE).getValue();
    long actualDeleteColumnCount =
      counters.findCounter(RowCounter.RowCounterMapper.Counters.DELETE_COLUMN).getValue();
    long actualDeleteFamilyCount =
      counters.findCounter(RowCounter.RowCounterMapper.Counters.DELETE_FAMILY).getValue();
    long actualDeleteFamilyVersionCount =
      counters.findCounter(RowCounter.RowCounterMapper.Counters.DELETE_FAMILY_VERSION).getValue();

    assertEquals(rowCount, actualRowCount);
    assertEquals(rowsWithDeleteMarkersCount, actualRowsWithDeleteMarkersCount);
    assertEquals(deleteCount, actualDeleteCount);
    assertEquals(deleteColumnCount, actualDeleteColumnCount);
    assertEquals(deleteFamilyCount, actualDeleteFamilyCount);
    assertEquals(deleteFamilyVersionCount, actualDeleteFamilyVersionCount);
  }
Step 1: Add 10 rows(row1, row2, row3, row4, row5, row6, row7, row8, row9, row10) to a table.
Each row contains 1 column family and 4 columns and values for two different timestamps - 5 &
10.
<p>
Step 2: Delete the latest version of column A for row1. --> 1 X Delete
<p>
Step 3: Delete the cell for timestamp 5 of column B for row1. --> 1 X Delete
<p>
Step 4: Delete a column family for row2 and row4. --> 2 X DeleteFamily
<p>
Step 5: Delete all versions of a specific column for row3, row5 and row6. --> 3 X DeleteColumn
<p>
Step 6: Delete all columns for timestamp 5 for row 7. --> 1 X DeleteFamilyVersion
<p>
Case 1: Run row counter without countDeleteMarkers and validate counter values.
<p>
Case 2: Run row counter with countDeleteMarkers flag and validate counter values.
<p>
Case 3: Run row counter with countDeleteMarkers flag for a row range and validate counter
values.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java