-------- Original Message --------
From: Smita Deshpande <[email protected]>
Sent: Wednesday, July 16, 2014 11:10 PM
To: [email protected]
Subject: Progress indicator should not be negative.
>Hi,
> I am running the distributed shell example of YARN on apache
> Hadoop 2.4.0.
>I have implemented getProgress method in my ApplicationMaster as follows
>
>public float getProgress() {
> // set progress to deliver to RM on next heartbeat
> float progress = 0;
> try{
> progress = (float) numCompletedContainers.get() /
> numTotalContainers.get();
> } catch(Exception _ex) {
> _ex.printStackTrace();
> }
> return progress;
>}
>
>While shutting down the application I get following excpetion
>
>- Interrupted while waiting for queue
>java.lang.InterruptedException
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2017)
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2052)
> at
> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
> at
> org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl$CallbackHandlerThread.run(AMRMClientAsyncImpl.java:275)
>
>When I restart my application I get following error
>
>java.lang.IllegalArgumentException: Progress indicator should not be negative
>
>Because of this, my ApplicationMaster is launched in another container. This
>exception is coming all the time in above scenario.
>
>Can you suggest me what is going wrong?
>
>Thanks,
>Smita
>