[ 
https://issues.apache.org/jira/browse/YARN-10536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17250778#comment-17250778
 ] 

Ahmed Hussein commented on YARN-10536:
--------------------------------------

The current implementation checks the timeout with reference to 
{{Client.clientStartTime}}. The latter is the timestamp of the object creation 
as shown in that [line of 
code|https://github.com/apache/hadoop/blob/df7f1e5199eed917ff40618708e7641238684d24/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java#L212].
The timeout should be measured when the client gets started (by calling 
{{run()}}) like in that [line of 
code|https://github.com/apache/hadoop/blob/df7f1e5199eed917ff40618708e7641238684d24/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java#L671].
 I do not think there is a point starting countdown on object creation?

> Client in distributedShell swallows interrupt exceptions
> --------------------------------------------------------
>
>                 Key: YARN-10536
>                 URL: https://issues.apache.org/jira/browse/YARN-10536
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: client, distributed-shell
>            Reporter: Ahmed Hussein
>            Assignee: Ahmed Hussein
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In {{applications.distributedshell.Client}} , the method 
> {{monitorApplication}} loops waiting for the following conditions:
> * Application fails: reaches {{YarnApplicationState.KILLED}}, or 
> {{YarnApplicationState.FAILED}}
> * Application succeeds: {{FinalApplicationStatus.SUCCEEDED}} or 
> {{YarnApplicationState.FINISHED}}
> * the time spent waiting is longer than {{clientTimeout}} (if it exists in 
> the parameters).
> When the Client thread is interrupted, it ignores the exception:
> {code:java}
>       // Check app status every 1 second.
>       try {
>         Thread.sleep(1000);
>       } catch (InterruptedException e) {
>         LOG.debug("Thread sleep in monitoring loop interrupted");
>       }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to