hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prabhu Joseph (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-9400) Remove unnecessary if at EntityGroupFSTimelineStore#parseApplicationId
Date Sat, 23 Mar 2019 04:32:00 GMT

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

Prabhu Joseph commented on YARN-9400:
-------------------------------------

[~giovanni.fumarola] Can you review this jira - this removes an unnecessary if statement.

> Remove unnecessary if at EntityGroupFSTimelineStore#parseApplicationId
> ----------------------------------------------------------------------
>
>                 Key: YARN-9400
>                 URL: https://issues.apache.org/jira/browse/YARN-9400
>             Project: Hadoop YARN
>          Issue Type: Improvement
>    Affects Versions: 3.2.0
>            Reporter: Prabhu Joseph
>            Assignee: Prabhu Joseph
>            Priority: Minor
>         Attachments: YARN-9400-001.patch
>
>
> If clause to validate whether appIdStr starts with "application" is not required at EntityGroupFSTimelineStore#parseApplicationId
> {code}
>  // converts the String to an ApplicationId or null if conversion failed
>   private static ApplicationId parseApplicationId(String appIdStr) {
>     ApplicationId appId = null;
>     if (appIdStr.startsWith(ApplicationId.appIdStrPrefix)) {
>       try {
>         appId = ApplicationId.fromString(appIdStr);
>       } catch (IllegalArgumentException e) {
>         appId = null;
>       }
>     }
>     return appId;
>   }
> {code}



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