I used to run my Hadoop job with the following
long start = new Date().getTime(); boolean status = job.waitForCompletion(true); long end = new Date().getTime();
That way, I could measure the time taken by the job when it ends directly in my code.
Now I have to use JobControl to express the dependencies between my jobs:
JobControl jobControl = new JobControl("MyJob"); jobControl.addJob(job1); jobControl.addJob(job2); job3.addDependingJob(job2); jobControl.addJob(job3); jobControl.run();
However, once jobControl.run () has been executed, the code never goes further, so I canβt include the code for polling jobControl.getState () to complete the job.
How to measure job execution time using JobControl?
source share