public int run()

in java/dataproc-wordcount/src/main/java/com/example/bigtable/sample/CellCounter.java [284:303]


  public int run(String[] args) throws Exception {
    String[] otherArgs = new GenericOptionsParser(getConf(), args).getRemainingArgs();
    if (otherArgs.length < 2) {
      System.err.println("ERROR: Wrong number of parameters: " + args.length);
      System.err.println("Usage: CellCounter ");
      System.err.println("       <tablename> <outputDir> <reportSeparator> [^[regex pattern] or " +
        "[Prefix] for row filter]] --starttime=[starttime] --endtime=[endtime]");
      System.err.println("  Note: -D properties will be applied to the conf used. ");
      System.err.println("  Additionally, the following SCAN properties can be specified");
      System.err.println("  to get fine grained control on what is counted..");
      System.err.println("   -D " + TableInputFormat.SCAN_COLUMN_FAMILY + "=<familyName>");
      System.err.println(" <reportSeparator> parameter can be used to override the default report separator " +
          "string : used to separate the rowId/column family name and qualifier name.");
      System.err.println(" [^[regex pattern] or [Prefix] parameter can be used to limit the cell counter count " +
          "operation to a limited subset of rows from the table based on regex or prefix pattern.");
      return -1;
    }
    Job job = createSubmittableJob(getConf(), otherArgs);
    return (job.waitForCompletion(true) ? 0 : 1);
  }