hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bikas Saha (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-378) ApplicationMaster retry times should be set by Client
Date Thu, 21 Mar 2013 18:09:16 GMT

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

Bikas Saha commented on YARN-378:
---------------------------------

Where are we making sure that the global value in the conf is a sane value (ie admin has not
mistakenly set a bad value)? 
Can we write the if condition as if(foo < 0 || foo > MAX) then foo = MAX). The nested
loop will make the reader of the code think more than needed IMO.
{code}
-    this.maxRetries = conf.getInt(YarnConfiguration.RM_AM_MAX_RETRIES,
-        YarnConfiguration.DEFAULT_RM_AM_MAX_RETRIES);
+    int globalMaxAppAttempts = conf.getInt(YarnConfiguration.RM_AM_MAX_ATTEMPTS,
+        YarnConfiguration.DEFAULT_RM_AM_MAX_ATTEMPTS);
+    int individualMaxAppAttempts = submissionContext.getMaxAppAttempts();
+    if (individualMaxAppAttempts <= 0) {
+        this.maxAppAttempts = globalMaxAppAttempts;
+    } else {
+      if (individualMaxAppAttempts <= globalMaxAppAttempts) {
+        this.maxAppAttempts = individualMaxAppAttempts;
+      } else {
+        this.maxAppAttempts = globalMaxAppAttempts;
{code}
                
> ApplicationMaster retry times should be set by Client
> -----------------------------------------------------
>
>                 Key: YARN-378
>                 URL: https://issues.apache.org/jira/browse/YARN-378
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: client, resourcemanager
>         Environment: suse
>            Reporter: xieguiming
>            Assignee: Zhijie Shen
>              Labels: usability
>         Attachments: YARN-378_10.patch, YARN-378_1.patch, YARN-378_2.patch, YARN-378_3.patch,
YARN-378_4.patch, YARN-378_5.patch, YARN-378_6.patch, YARN-378_6.patch, YARN-378_7.patch,
YARN-378_8.patch, YARN-378_9.patch, YARN-378_MAPREDUCE-5062.patch
>
>
> We should support that different client or user have different ApplicationMaster retry
times. It also say that "yarn.resourcemanager.am.max-retries" should be set by client. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message