public static RunningJob runJob ( JobConf job ) throws IOException { JobClient jc = new JobClient ( job ) ; RunningJob rj = jc . submitJob ( job ) ; try { if ( ! jc . monitorAndPrintJob ( job , rj ) ) { throw new IOException ( "Job failed!" ) ; } } catch ( InterruptedException ie ) { Thread . currentThread ( ) . interrupt ( ) ; } return rj ; }
Utility that submits a job then polls for progress until the job is complete .