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

Several log refactoring/improvement suggestion in YARN

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Inconsistent logging content and logging level for server nodemanager:
      Similar to a fix for MAPREDUCE-2907, in file:

      hadoop-rel-release-2.7.2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/DummyContainerManager.java

      In line 96, the logging text indicates this is a DEBUG level log, but the level is set to info.

      LOG.info("DEBUG: " + req + ":" + rsrcReqs.getContainer().getContainerId());
      

      Log refactoring: method invocation should be replaced by variable in yarn server
      Similar to the fix for HDFS-409. In file:

      hadoop-rel-release-2.7.2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/security/NMTokenSecretManagerInNM.java

      ...
      ApplicationAttemptId appAttemptId = identifier.getApplicationAttemptId();
      ...
      LOG.debug("NMToken key updated for application attempt : "
                + identifier.getApplicationAttemptId().toString());
      

      In line 226, the method invocation identifier.getApplicationAttemptId().toString()) can be replaced by appAttemptId.


      Exception should be recorded as caught rather than thrown

      Similar to the fix to HADOOP-657. In file:

      hadoop-rel-release-2.7.2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/CleanerTask.java

      In line 221, the exception was caught rather than thrown.

      try {
              store.cleanResourceReferences(key);
      } catch (YarnException e) {
              LOG.error("Exception thrown while removing dead appIds.", e);
         }
      

        Attachments

        1. YARN-5507.001.patch
          2 kB
          Vrushali C

          Issue Links

            Activity

              People

              • Assignee:
                vrushalic Vrushali C
                Reporter:
                chenfsd Nemo Chen
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: