Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-7698

A misleading variable's name in ApplicationAttemptEventDispatcher

    Details

    • Hadoop Flags:
      Reviewed

      Description

      I find there are two variables named "appAttemptId" in ApplicationAttemptEventDispatcher.

      public static final class ApplicationAttemptEventDispatcher implements
            EventHandler<RMAppAttemptEvent> {
          ....
          public void handle(RMAppAttemptEvent event) {
            ApplicationAttemptId appAttemptID = event.getApplicationAttemptId();
            ApplicationId appAttemptId = appAttemptID.getApplicationId();
            ....
          }
      

      The first one is named as "appAttemptID" which is the true attempt id.
      The other one is named as "appAttemptId", 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"

        Attachments

        1. YARN-7698.002.patch
          2 kB
          Jinjiang Ling
        2. YARN-7698.002.patch
          2 kB
          Jinjiang Ling
        3. YARN-7698.001.patch
          3 kB
          Jinjiang Ling

          Activity

            People

            • Assignee:
              lingjinjiang Jinjiang Ling
              Reporter:
              lingjinjiang Jinjiang Ling
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: