hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira Ajisaka (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-7698) A misleading variable's name in ApplicationAttemptEventDispatcher
Date Mon, 29 Jan 2018 15:12:00 GMT

     [ https://issues.apache.org/jira/browse/YARN-7698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Akira Ajisaka updated YARN-7698:
--------------------------------
      Priority: Minor  (was: Major)
    Issue Type: Bug  (was: Improvement)

> A misleading variable's name in ApplicationAttemptEventDispatcher
> -----------------------------------------------------------------
>
>                 Key: YARN-7698
>                 URL: https://issues.apache.org/jira/browse/YARN-7698
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: Jinjiang Ling
>            Assignee: Jinjiang Ling
>            Priority: Minor
>         Attachments: YARN-7698.001.patch, YARN-7698.002.patch, YARN-7698.002.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
(v7.6.3#76005)

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


Mime
View raw message