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); }