@Override
  protected void processOptions(CommandLine cmd) throws IllegalArgumentException {
    this.tableName = cmd.getArgList().get(0);
    if (cmd.getOptionValue(OPT_RANGE) != null) {
      this.rowRangeList = parseRowRangeParameter(cmd.getOptionValue(OPT_RANGE));
    }
    this.endTime = cmd.getOptionValue(OPT_END_TIME) == null
      ? HConstants.LATEST_TIMESTAMP
      : Long.parseLong(cmd.getOptionValue(OPT_END_TIME));
    this.expectedCount = cmd.getOptionValue(OPT_EXPECTED_COUNT) == null
      ? Long.MIN_VALUE
      : Long.parseLong(cmd.getOptionValue(OPT_EXPECTED_COUNT));
    this.startTime = cmd.getOptionValue(OPT_START_TIME) == null
      ? 0
      : Long.parseLong(cmd.getOptionValue(OPT_START_TIME));
    this.countDeleteMarkers = cmd.hasOption(OPT_COUNT_DELETE_MARKERS);

    for (int i = 1; i < cmd.getArgList().size(); i++) {
      String argument = cmd.getArgList().get(i);
      if (!argument.startsWith("-")) {
        this.columns.add(argument);
      }
    }

    if (endTime < startTime) {
      throw new IllegalArgumentException(
        "--endtime=" + endTime + " needs to be greater than --starttime=" + startTime);
    }
  }
Sets filter {@link FilterBase} to the {@link Scan} instance. If provided rowRangeList contains
more than one element, method sets filter which is instance of {@link MultiRowRangeFilter}. If
rowRangeList contains exactly one element, startRow and stopRow are set to the scan. Also,
method may apply {@link FirstKeyOnlyFilter} an {@link KeyOnlyFilter} for better performance.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java