hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rake...@apache.org
Subject [31/50] [abbrv] hadoop git commit: YARN-5805. Add isDebugEnabled check for debug logs in nodemanager (Bibin A Chundatt via Varun Saxena)
Date Wed, 02 Nov 2016 17:39:10 GMT
YARN-5805. Add isDebugEnabled check for debug logs in nodemanager (Bibin A Chundatt via Varun
Saxena)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/310aa468
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/310aa468
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/310aa468

Branch: refs/heads/HDFS-10285
Commit: 310aa4686eb697f0700a71d33106514c404dab1b
Parents: 7ba74be
Author: Varun Saxena <varunsaxena@apache.org>
Authored: Tue Nov 1 14:51:17 2016 +0530
Committer: Varun Saxena <varunsaxena@apache.org>
Committed: Tue Nov 1 14:51:31 2016 +0530

----------------------------------------------------------------------
 .../nodemanager/DefaultContainerExecutor.java   |  7 ++--
 .../server/nodemanager/DeletionService.java     | 13 +++++--
 .../nodemanager/amrmproxy/AMRMProxyService.java |  4 ++-
 .../application/ApplicationImpl.java            |  6 ++--
 .../container/ContainerImpl.java                |  5 +--
 .../launcher/ContainerLaunch.java               | 36 +++++++++++---------
 .../localizer/LocalizedResource.java            |  5 +--
 .../security/LocalizerTokenSelector.java        |  4 ++-
 .../monitor/ContainersMonitorImpl.java          | 13 +++----
 .../security/NMTokenSecretManagerInNM.java      | 16 ++++++---
 .../nodemanager/util/ProcessIdFileReader.java   | 12 ++++---
 11 files changed, 75 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
index 4947820..420035d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
@@ -556,9 +556,10 @@ public class DefaultContainerExecutor extends ContainerExecutor {
     String user = ctx.getUser();
     String pid = ctx.getPid();
     Signal signal = ctx.getSignal();
-
-    LOG.debug("Sending signal " + signal.getValue() + " to pid " + pid
-        + " as user " + user);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Sending signal " + signal.getValue() + " to pid " + pid
+          + " as user " + user);
+    }
     if (!containerIsAlive(pid)) {
       return false;
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java
index db834b2..aac0af9 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DeletionService.java
@@ -239,7 +239,9 @@ public class DeletionService extends AbstractService {
       boolean error = false;
       if (null == user) {
         if (baseDirs == null || baseDirs.size() == 0) {
-          LOG.debug("NM deleting absolute path : " + subDir);
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("NM deleting absolute path : " + subDir);
+          }
           try {
             lfs.delete(subDir, true);
           } catch (IOException e) {
@@ -249,7 +251,9 @@ public class DeletionService extends AbstractService {
         } else {
           for (Path baseDir : baseDirs) {
             Path del = subDir == null? baseDir : new Path(baseDir, subDir);
-            LOG.debug("NM deleting path : " + del);
+            if (LOG.isDebugEnabled()) {
+              LOG.debug("NM deleting path : " + del);
+            }
             try {
               lfs.delete(del, true);
             } catch (IOException e) {
@@ -260,7 +264,10 @@ public class DeletionService extends AbstractService {
         }
       } else {
         try {
-          LOG.debug("Deleting path: [" + subDir + "] as user: [" + user + "]");
+          if (LOG.isDebugEnabled()) {
+            LOG.debug(
+                "Deleting path: [" + subDir + "] as user: [" + user + "]");
+          }
           if (baseDirs == null || baseDirs.size() == 0) {
             delService.exec.deleteAsUser(new DeletionAsUserContext.Builder()
                 .setUser(user)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java
index 511db16..79882aa 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java
@@ -549,7 +549,9 @@ public class AMRMProxyService extends AbstractService implements
           AMRMProxyService.this.stopApplication(event.getApplicationID());
           break;
         default:
-          LOG.debug("AMRMProxy is ignoring event: " + event.getType());
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("AMRMProxy is ignoring event: " + event.getType());
+          }
           break;
         }
       } else {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java
index 531693e..b9197c2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java
@@ -591,8 +591,10 @@ public class ApplicationImpl implements Application {
 
     try {
       ApplicationId applicationID = event.getApplicationID();
-      LOG.debug("Processing " + applicationID + " of type " + event.getType());
-
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(
+            "Processing " + applicationID + " of type " + event.getType());
+      }
       ApplicationState oldState = stateMachine.getCurrentState();
       ApplicationState newState = null;
       try {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java
index e6b9d9f..307cf5d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerImpl.java
@@ -1641,8 +1641,9 @@ public class ContainerImpl implements Container {
       this.writeLock.lock();
 
       ContainerId containerID = event.getContainerID();
-      LOG.debug("Processing " + containerID + " of type " + event.getType());
-
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Processing " + containerID + " of type " + event.getType());
+      }
       ContainerState oldState = stateMachine.getCurrentState();
       ContainerState newState = null;
       try {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
index d8239ef..d774030 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
@@ -571,8 +571,9 @@ public class ContainerLaunch implements Callable<Integer> {
           + " No cleanup needed to be done");
       return;
     }
-
-    LOG.debug("Marking container " + containerIdStr + " as inactive");
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Marking container " + containerIdStr + " as inactive");
+    }
     // this should ensure that if the container process has not launched 
     // by this time, it will never be launched
     exec.deactivateContainer(containerId);
@@ -596,10 +597,10 @@ public class ContainerLaunch implements Callable<Integer> {
       // kill process
       if (processId != null) {
         String user = container.getUser();
-        LOG.debug("Sending signal to pid " + processId
-            + " as user " + user
-            + " for container " + containerIdStr);
-
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Sending signal to pid " + processId + " as user " + user
+              + " for container " + containerIdStr);
+        }
         final Signal signal = sleepDelayBeforeSigKill > 0
           ? Signal.TERM
           : Signal.KILL;
@@ -611,12 +612,11 @@ public class ContainerLaunch implements Callable<Integer> {
                 .setPid(processId)
                 .setSignal(signal)
                 .build());
-
-        LOG.debug("Sent signal " + signal + " to pid " + processId
-          + " as user " + user
-          + " for container " + containerIdStr
-          + ", result=" + (result? "success" : "failed"));
-
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Sent signal " + signal + " to pid " + processId
+              + " as user " + user + " for container " + containerIdStr
+              + ", result=" + (result ? "success" : "failed"));
+        }
         if (sleepDelayBeforeSigKill > 0) {
           new DelayedProcessKiller(container, user,
               processId, sleepDelayBeforeSigKill, Signal.KILL, exec).start();
@@ -744,8 +744,10 @@ public class ContainerLaunch implements Callable<Integer> {
     String containerIdStr = 
         container.getContainerId().toString();
     String processId = null;
-    LOG.debug("Accessing pid for container " + containerIdStr
-        + " from pid file " + pidFilePath);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Accessing pid for container " + containerIdStr
+          + " from pid file " + pidFilePath);
+    }
     int sleepCounter = 0;
     final int sleepInterval = 100;
 
@@ -754,8 +756,10 @@ public class ContainerLaunch implements Callable<Integer> {
     while (true) {
       processId = ProcessIdFileReader.getProcessId(pidFilePath);
       if (processId != null) {
-        LOG.debug("Got pid " + processId + " for container "
-            + containerIdStr);
+        if (LOG.isDebugEnabled()) {
+          LOG.debug(
+              "Got pid " + processId + " for container " + containerIdStr);
+        }
         break;
       }
       else if ((sleepCounter*sleepInterval) > maxKillWaitTime) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/LocalizedResource.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/LocalizedResource.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/LocalizedResource.java
index 464293a..6d67cac 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/LocalizedResource.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/LocalizedResource.java
@@ -190,8 +190,9 @@ public class LocalizedResource implements EventHandler<ResourceEvent>
{
       this.writeLock.lock();
 
       Path resourcePath = event.getLocalResourceRequest().getPath();
-      LOG.debug("Processing " + resourcePath + " of type " + event.getType());
-
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Processing " + resourcePath + " of type " + event.getType());
+      }
       ResourceState oldState = this.stateMachine.getCurrentState();
       ResourceState newState = null;
       try {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/security/LocalizerTokenSelector.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/security/LocalizerTokenSelector.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/security/LocalizerTokenSelector.java
index 56c6da3..7c4f982 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/security/LocalizerTokenSelector.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/security/LocalizerTokenSelector.java
@@ -41,7 +41,9 @@ public class LocalizerTokenSelector implements
     LOG.debug("Using localizerTokenSelector.");
 
     for (Token<? extends TokenIdentifier> token : tokens) {
-      LOG.debug("Token of kind " + token.getKind() + " is found");
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Token of kind " + token.getKind() + " is found");
+      }
       if (LocalizerTokenIdentifier.KIND.equals(token.getKind())) {
         return (Token<LocalizerTokenIdentifier>) token;
       }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
index cd9d6af..432cd67 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
@@ -446,9 +446,10 @@ public class ContainersMonitorImpl extends AbstractService implements
             if (pId == null || !isResourceCalculatorAvailable()) {
               continue; // processTree cannot be tracked
             }
-
-            LOG.debug("Constructing ProcessTree for : PID = " + pId
-                + " ContainerId = " + containerId);
+            if (LOG.isDebugEnabled()) {
+              LOG.debug("Constructing ProcessTree for : PID = " + pId
+                  + " ContainerId = " + containerId);
+            }
             ResourceCalculatorProcessTree pTree = ptInfo.getProcessTree();
             pTree.updateProcessTree();    // update process-tree
             long currentVmemUsage = pTree.getVirtualMemorySize();
@@ -527,9 +528,9 @@ public class ContainersMonitorImpl extends AbstractService implements
         if (pId != null) {
           // pId will be null, either if the container is not spawned yet
           // or if the container's pid is removed from ContainerExecutor
-          LOG.debug("Tracking ProcessTree " + pId
-                  + " for the first time");
-
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Tracking ProcessTree " + pId + " for the first time");
+          }
           ResourceCalculatorProcessTree pt =
                   ResourceCalculatorProcessTree.
                         getResourceCalculatorProcessTree(

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/security/NMTokenSecretManagerInNM.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/security/NMTokenSecretManagerInNM.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/security/NMTokenSecretManagerInNM.java
index 86cce35..4ed6118 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/security/NMTokenSecretManagerInNM.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/security/NMTokenSecretManagerInNM.java
@@ -191,8 +191,10 @@ public class NMTokenSecretManagerInNM extends BaseNMTokenSecretManager
{
   public synchronized void appFinished(ApplicationId appId) {
     List<ApplicationAttemptId> appAttemptList = appToAppAttemptMap.get(appId);
     if (appAttemptList != null) {
-      LOG.debug("Removing application attempts NMToken keys for application "
-          + appId);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Removing application attempts NMToken keys for application "
+            + appId);
+      }
       for (ApplicationAttemptId appAttemptId : appAttemptList) {
         removeAppAttemptKey(appAttemptId);
       }
@@ -226,8 +228,10 @@ public class NMTokenSecretManagerInNM extends BaseNMTokenSecretManager
{
     if (oldKey == null
         || oldKey.getMasterKey().getKeyId() != identifier.getKeyId()) {
       // Update key only if it is modified.
-      LOG.debug("NMToken key updated for application attempt : "
-          + identifier.getApplicationAttemptId().toString());
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("NMToken key updated for application attempt : "
+            + identifier.getApplicationAttemptId().toString());
+      }
       if (identifier.getKeyId() == currentMasterKey.getMasterKey()
         .getKeyId()) {
         updateAppAttemptKey(appAttemptId, currentMasterKey);
@@ -243,7 +247,9 @@ public class NMTokenSecretManagerInNM extends BaseNMTokenSecretManager
{
   }
   
   public synchronized void setNodeId(NodeId nodeId) {
-    LOG.debug("updating nodeId : " + nodeId);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("updating nodeId : " + nodeId);
+    }
     this.nodeId = nodeId;
   }
   

http://git-wip-us.apache.org/repos/asf/hadoop/blob/310aa468/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/ProcessIdFileReader.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/ProcessIdFileReader.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/ProcessIdFileReader.java
index 5a7dba7..41d299e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/ProcessIdFileReader.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/ProcessIdFileReader.java
@@ -48,8 +48,9 @@ public class ProcessIdFileReader {
     if (path == null) {
       throw new IOException("Trying to access process id from a null path");
     }
-    
-    LOG.debug("Accessing pid from pid file " + path);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Accessing pid from pid file " + path);
+    }
     String processId = null;
     BufferedReader bufReader = null;
 
@@ -97,9 +98,10 @@ public class ProcessIdFileReader {
         bufReader.close();
       }
     }
-    LOG.debug("Got pid " 
-        + (processId != null? processId : "null")  
-        + " from path " + path);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Got pid " + (processId != null ? processId : "null")
+          + " from path " + path);
+    }
     return processId;
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message