akiyamaneko created YARN-10529:
----------------------------------

             Summary: The attempt id displayed on the graph-view tab in the 
YARN-UI2 page is wrong
                 Key: YARN-10529
                 URL: https://issues.apache.org/jira/browse/YARN-10529
             Project: Hadoop YARN
          Issue Type: Bug
          Components: yarn-ui-v2
    Affects Versions: 3.1.1
            Reporter: akiyamaneko
         Attachments: Graph View ApptemptID shows error.png, Graph View 
ApptemptID shows ok.png

{color:#403294}*ShortAppAttemptId* {color}displayed on the page was got by 
*shortAppAttemptId*()=> *containerIdToAttemptIdontainerIdToAttemptId*
{code:javascript}
shortAppAttemptId: function() {
    if (!this.get("containerId")) {
      return this.get("id");
    }
    return "attempt_" +
           
parseInt(Converter.containerIdToAttemptId(this.get("containerId")).split("_")[3]);
  }.property("containerId"),

{code}
{code:javascript}
containerIdToAttemptIdontainerIdToAttemptId: function(containerId) {
    if (containerId) {
// containerId example : container_e73_1605851303713_0005_01_000001
 // try to get the attempt id (marked in red), but the actual attempt id is *01*
      var arr = containerId.split('_');
      var attemptId = ["appattempt", arr[1],
        arr[2], this.padding(arr[3], 6)];
      return attemptId.join('_');
    }
  },
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-dev-h...@hadoop.apache.org

Reply via email to