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

Jian He commented on YARN-5611:
-------------------------------

- I thought the lifetime passed in the updateLifetime API is an absolute value, 
looks like it's extra ?  should it be absolute ? so that shorten it is also 
possible in future.
- For below code , appTimeouts.setLifetime will throw NPE if appTimeout is null.
{code}
    ApplicationTimeouts appTimeouts =
        application.getApplicationSubmissionContext().getApplicationTimeouts();
    if (appTimeouts != null) {
      oldLifetime =
          appTimeouts.getLifetime() > 0 ? appTimeouts.getLifetime() : 0;
    }
    appTimeouts.setLifetime(oldLifetime + newLifetime);
{code}
- The updateApplicationTimeout will store the updated 
applicationSubmissionContext, it is possible that this happens even before the 
original appSubmissionContext is persisted when app is submitted. Then the 
updated timeout will be overwritten. 

- similarly for below code, the newLifetime could be overwritten by the 
original timeout in appSubmissionContext on submission.  then we lost the 
updated timeout. 
{code}
      // If application is not monitored earlier then start monitoring from now
      register(appId);
      monitoredApps.put(appId, newLifetime);
{code}
so should we allow update only when app is running or accepted?

> Provide an API to update lifetime of an application.
> ----------------------------------------------------
>
>                 Key: YARN-5611
>                 URL: https://issues.apache.org/jira/browse/YARN-5611
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Rohith Sharma K S
>            Assignee: Rohith Sharma K S
>         Attachments: 0001-YARN-5611.patch, YARN-5611.v0.patch
>
>
> YARN-4205 monitors an Lifetime of an applications is monitored if required. 
> Add an client api to update lifetime of an application. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
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