hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [17/50] [abbrv] hadoop git commit: YARN-1297. FairScheduler: Move some logs to debug and check if debug logging is enabled
Date Fri, 29 Apr 2016 20:20:13 GMT
YARN-1297. FairScheduler: Move some logs to debug and check if debug logging is enabled


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

Branch: refs/heads/HDFS-7240
Commit: 4b1dcbbe0c1d0036f65283be4b25d9b2211abed3
Parents: a5fed8b
Author: Karthik Kambatla <kasha@apache.org>
Authored: Tue Apr 26 05:10:09 2016 -0700
Committer: Karthik Kambatla <kasha@apache.org>
Committed: Tue Apr 26 05:10:09 2016 -0700

----------------------------------------------------------------------
 .../rmcontainer/RMContainerImpl.java            |  5 ++-
 .../scheduler/SchedulerNode.java                | 36 ++++++++++++--------
 .../scheduler/fair/FSAppAttempt.java            | 12 ++++---
 .../scheduler/fair/FairScheduler.java           | 16 +++++----
 4 files changed, 42 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b1dcbbe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
index 16ab55d..919f12d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
@@ -435,7 +435,10 @@ public class RMContainerImpl implements RMContainer, Comparable<RMContainer>
{
   
   @Override
   public void handle(RMContainerEvent event) {
-    LOG.debug("Processing " + event.getContainerId() + " of type " + event.getType());
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Processing " + event.getContainerId() + " of type " + event
+              .getType());
+    }
     try {
       writeLock.lock();
       RMContainerState oldState = getState();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b1dcbbe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
index 6c4f300..e219494 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java
@@ -154,11 +154,13 @@ public abstract class SchedulerNode {
 
     launchedContainers.put(container.getId(), rmContainer);
 
-    LOG.info("Assigned container " + container.getId() + " of capacity "
-        + container.getResource() + " on host " + rmNode.getNodeAddress()
-        + ", which has " + numContainers + " containers, "
-        + getAllocatedResource() + " used and " + getUnallocatedResource()
-        + " available after allocation");
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Assigned container " + container.getId() + " of capacity "
+              + container.getResource() + " on host " + rmNode.getNodeAddress()
+              + ", which has " + numContainers + " containers, "
+              + getAllocatedResource() + " used and " + getUnallocatedResource()
+              + " available after allocation");
+    }
   }
 
   /**
@@ -175,11 +177,13 @@ public abstract class SchedulerNode {
       addUnallocatedResource(deltaResource);
     }
 
-    LOG.info((increase ? "Increased" : "Decreased") + " container "
-        + containerId + " of capacity " + deltaResource + " on host "
-        + rmNode.getNodeAddress() + ", which has " + numContainers
-        + " containers, " + getAllocatedResource() + " used and "
-        + getUnallocatedResource() + " available after allocation");
+    if (LOG.isDebugEnabled()) {
+      LOG.debug((increase ? "Increased" : "Decreased") + " container "
+              + containerId + " of capacity " + deltaResource + " on host "
+              + rmNode.getNodeAddress() + ", which has " + numContainers
+              + " containers, " + getAllocatedResource() + " used and "
+              + getUnallocatedResource() + " available after allocation");
+    }
   }
   
   /**
@@ -261,11 +265,13 @@ public abstract class SchedulerNode {
       updateResource(container);
     }
 
-    LOG.info("Released container " + container.getId() + " of capacity "
-        + container.getResource() + " on host " + rmNode.getNodeAddress()
-        + ", which currently has " + numContainers + " containers, "
-        + getAllocatedResource() + " used and " + getUnallocatedResource()
-        + " available" + ", release resources=" + true);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Released container " + container.getId() + " of capacity "
+              + container.getResource() + " on host " + rmNode.getNodeAddress()
+              + ", which currently has " + numContainers + " containers, "
+              + getAllocatedResource() + " used and " + getUnallocatedResource()
+              + " available" + ", release resources=" + true);
+    }
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b1dcbbe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
index e426da6..0190742 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
@@ -135,12 +135,14 @@ public class FSAppAttempt extends SchedulerApplicationAttempt
     rmContainer.handle(
         new RMContainerFinishedEvent(
             containerId,
-            containerStatus, 
+            containerStatus,
             event)
-        );
-    LOG.info("Completed container: " + rmContainer.getContainerId() + 
-        " in state: " + rmContainer.getState() + " event:" + event);
-    
+    );
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Completed container: " + rmContainer.getContainerId() +
+              " in state: " + rmContainer.getState() + " event:" + event);
+    }
+
     // Remove from the list of containers
     liveContainers.remove(rmContainer.getContainerId());
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b1dcbbe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
index 3df0600..6a14c4c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FairScheduler.java
@@ -494,9 +494,11 @@ public class FairScheduler extends
         // TODO: Not sure if this ever actually adds this to the list of cleanup
         // containers on the RMNode (see SchedulerNode.releaseContainer()).
         super.completedContainer(container, status, RMContainerEventType.KILL);
-        LOG.info("Killing container" + container +
-            " (after waiting for preemption for " +
-            (getClock().getTime() - time) + "ms)");
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Killing container" + container +
+                  " (after waiting for preemption for " +
+                  (getClock().getTime() - time) + "ms)");
+        }
       }
     } else {
       // track the request in the FSAppAttempt itself
@@ -869,9 +871,11 @@ public class FairScheduler extends
       updateRootQueueMetrics();
     }
 
-    LOG.info("Application attempt " + application.getApplicationAttemptId()
-        + " released container " + container.getId() + " on node: " + node
-        + " with event: " + event);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Application attempt " + application.getApplicationAttemptId()
+              + " released container " + container.getId() + " on node: " + node
+              + " with event: " + event);
+    }
   }
 
   private synchronized void addNode(List<NMContainerStatus> containerReports,


---------------------------------------------------------------------
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