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 "Prabhu Joseph (JIRA)" <ji...@apache.org> on 2019/03/20 06:24:00 UTC

[jira] [Created] (YARN-9400) Remove unnecessary if at EntityGroupFSTimelineStore#parseApplicationId

Prabhu Joseph created YARN-9400:
-----------------------------------

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


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