浏览代码

YARN-4115. Reduce loglevel of ContainerManagementProtocolProxy to Debug (adhoot via rkanter)

(cherry picked from commit b84fb41bb6ca2d69153cf5bd61f88492538ee713)
Robert Kanter 9 年之前
父节点
当前提交
d07eef8c87

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -766,6 +766,9 @@ Release 2.8.0 - UNRELEASED
     YARN-4106. NodeLabels for NM in distributed mode is not updated even after
     YARN-4106. NodeLabels for NM in distributed mode is not updated even after
     clusterNodelabel addition in RM. (Bibin A Chundatt via wangda)
     clusterNodelabel addition in RM. (Bibin A Chundatt via wangda)
 
 
+    YARN-4115. Reduce loglevel of ContainerManagementProtocolProxy to Debug
+    (adhoot via rkanter)
+
 Release 2.7.2 - UNRELEASED
 Release 2.7.2 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 10 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/ContainerManagementProtocolProxy.java

@@ -106,8 +106,10 @@ public class ContainerManagementProtocolProxy {
     while (proxy != null
     while (proxy != null
         && !proxy.token.getIdentifier().equals(
         && !proxy.token.getIdentifier().equals(
             nmTokenCache.getToken(containerManagerBindAddr).getIdentifier())) {
             nmTokenCache.getToken(containerManagerBindAddr).getIdentifier())) {
-      LOG.info("Refreshing proxy as NMToken got updated for node : "
-          + containerManagerBindAddr);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Refreshing proxy as NMToken got updated for node : "
+            + containerManagerBindAddr);
+      }
       // Token is updated. check if anyone has already tried closing it.
       // Token is updated. check if anyone has already tried closing it.
       if (!proxy.scheduledForClose) {
       if (!proxy.scheduledForClose) {
         // try closing the proxy. Here if someone is already using it
         // try closing the proxy. Here if someone is already using it
@@ -187,7 +189,9 @@ public class ContainerManagementProtocolProxy {
       ContainerManagementProtocolProxyData proxy) {
       ContainerManagementProtocolProxyData proxy) {
     proxy.activeCallers--;
     proxy.activeCallers--;
     if (proxy.scheduledForClose && proxy.activeCallers < 0) {
     if (proxy.scheduledForClose && proxy.activeCallers < 0) {
-      LOG.info("Closing proxy : " + proxy.containerManagerBindAddr);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Closing proxy : " + proxy.containerManagerBindAddr);
+      }
       cmProxy.remove(proxy.containerManagerBindAddr);
       cmProxy.remove(proxy.containerManagerBindAddr);
       try {
       try {
         rpc.stopProxy(proxy.getContainerManagementProtocol(), conf);
         rpc.stopProxy(proxy.getContainerManagementProtocol(), conf);
@@ -257,7 +261,9 @@ public class ContainerManagementProtocolProxy {
       
       
       final InetSocketAddress cmAddr =
       final InetSocketAddress cmAddr =
           NetUtils.createSocketAddr(containerManagerBindAddr);
           NetUtils.createSocketAddr(containerManagerBindAddr);
-      LOG.info("Opening proxy : " + containerManagerBindAddr);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Opening proxy : " + containerManagerBindAddr);
+      }
       // the user in createRemoteUser in this context has to be ContainerID
       // the user in createRemoteUser in this context has to be ContainerID
       UserGroupInformation user =
       UserGroupInformation user =
           UserGroupInformation.createRemoteUser(containerId
           UserGroupInformation.createRemoteUser(containerId