code: public int run(String[] args) throws Exception {
      if (args.length != 2) {
        System.err.println("Usage: "+getClass().getName()+" <nMaps> <nSamples>");
        ToolRunner.printGenericCommandUsage(System.err);
        return -1;
      }
      
      final int nMaps = Integer.parseInt(args[0]);
      final long nSamples = Long.parseLong(args[1]);
          
      System.out.println("Number of Maps  = " + nMaps);
      System.out.println("Samples per Map = " + nSamples);
          
      final JobConf jobConf = new JobConf(getConf(), getClass());
      System.out.println("Estimated value of Pi is "
          + estimate(nMaps, nSamples, jobConf));
      return 0;
    }
docs: Parse arguments and then runs a map/reduce job.
  Print output in standard out.
  
  @return a non-zero if there is an error.  Otherwise, return 0.