Hey Adam,
On Wed, May 11, 2011 at 5:17 AM, Adam Phelps <[email protected]> wrote:
> We could make a change of that nature. We currently use
> job.waitForCompletion() to submit jobs, if we switch to job.submit() is
> there an alternate blocking call to wait for the job to finish other than
> polling job.isComplete()? I'm not currently seeing anything in the API.
Polling isComplete() is exactly what the waitForCompletion does
underneath anyway. It is fine to use the same.
This is what the waitForCompletion entails:
while (!isComplete()) {
try {
Thread.sleep(5000-(default)-millis);
} catch (InterruptedException ie) {
}
}
--
Harsh J