code: public boolean waitForCompletion(boolean verbose
                                     ) throws IOException, InterruptedException,
                                              ClassNotFoundException {
      if (state == JobState.DEFINE) {
        submit();
      }
      if (verbose) {
        jobClient.monitorAndPrintJob(conf, info);
      } else {
        info.waitForCompletion();
      }
      return isSuccessful();
    }
docs: Submit the job to the cluster and wait for it to finish.
  @param verbose print the progress to the user
  @return true if the job succeeded
  @throws IOException thrown if the communication with the
  <code>JobTracker</code> is lost