public boolean waitForCompletion(boolean verbose) throws IOException, InterruptedException, ClassNotFoundException, Exception { if (state == JobState.DEFINE) { submit(); } if (verbose) { jobClient.monitorAndPrintJob(this, info, getNumSuperStep()); } else { info.waitForCompletion(); } return isSuccessful(); }
public void submit() throws IOException, ClassNotFoundException, InterruptedException, Exception { ensureState(JobState.DEFINE); info = jobClient.submitJobInternal(this); state = JobState.RUNNING; }