You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "genericqa (JIRA)" <ji...@apache.org> on 2018/01/04 12:11:00 UTC

[jira] [Commented] (YARN-7698) A misleading variable's name in ApplicationAttemptEventDispatcher

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

genericqa commented on YARN-7698:
---------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  0s{color} | {color:blue} Docker mode activated. {color} |
| {color:red}-1{color} | {color:red} patch {color} | {color:red}  0m  4s{color} | {color:red} YARN-7698 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | YARN-7698 |
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12904585/YARN-7698.001.patch |
| Console output | https://builds.apache.org/job/PreCommit-YARN-Build/19104/console |
| Powered by | Apache Yetus 0.7.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> A misleading variable's name in ApplicationAttemptEventDispatcher
> -----------------------------------------------------------------
>
>                 Key: YARN-7698
>                 URL: https://issues.apache.org/jira/browse/YARN-7698
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: resourcemanager
>            Reporter: Jinjiang Ling
>            Assignee: Jinjiang Ling
>            Priority: Minor
>         Attachments: YARN-7698.001.patch
>
>
> I find there are two variables named "appAttemptId" in ApplicationAttemptEventDispatcher.
> {code:java}
> public static final class ApplicationAttemptEventDispatcher implements
>       EventHandler<RMAppAttemptEvent> {
>     ....
>     public void handle(RMAppAttemptEvent event) {
>       ApplicationAttemptId appAttemptID = event.getApplicationAttemptId();
>       ApplicationId appAttemptId = appAttemptID.getApplicationId();
>       ....
>     }
> {code}
> The first one is named as "{color:red}appAttemptID{color}" which is the true attempt id. 
> The other one is named as  "{color:red}appAttemptId{color}", but I think it's currect name should be "appId".
> I'm not sure there are any reason to name the application id as "appAttemptId". But I think two "appAttemptId" in one function may cause some misleading, so it's better to fix the second one to "appId"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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