hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject hadoop git commit: YARN-6112. UpdateCallDuration is calculated only when debug logging is enabled. (Yufei Gu via kasha)
Date Thu, 09 Feb 2017 21:12:28 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 d008b5515 -> 41361ec39


YARN-6112. UpdateCallDuration is calculated only when debug logging is enabled. (Yufei Gu
via kasha)


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

Branch: refs/heads/branch-2
Commit: 41361ec39e84ec9949285b86ed97888ed4871bc4
Parents: d008b55
Author: Karthik Kambatla <kasha@cloudera.com>
Authored: Thu Feb 9 13:12:21 2017 -0800
Committer: Karthik Kambatla <kasha@cloudera.com>
Committed: Thu Feb 9 13:12:21 2017 -0800

----------------------------------------------------------------------
 .../server/resourcemanager/scheduler/fair/FairScheduler.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/41361ec3/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 9694d62..f75f2dd 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
@@ -312,6 +312,9 @@ public class FairScheduler extends
           long start = getClock().getTime();
           update();
           long duration = getClock().getTime() - start;
+          // UpdateCall duration and ThreadRun Duration are the same after
+          // YARN-4752 (preemption overhaul), we keep both for compatibility.
+          fsOpDurations.addUpdateCallDuration(duration);
           fsOpDurations.addUpdateThreadRunDuration(duration);
         } catch (InterruptedException ie) {
           LOG.warn("Update thread interrupted. Exiting.");
@@ -351,7 +354,6 @@ public class FairScheduler extends
   protected void update() {
     try {
       writeLock.lock();
-      long start = getClock().getTime();
 
       FSQueue rootQueue = queueMgr.getRootQueue();
 
@@ -374,9 +376,6 @@ public class FairScheduler extends
               rootMetrics.getAvailableVirtualCores()) +
               "  Demand: " + rootQueue.getDemand());
         }
-
-        long duration = getClock().getTime() - start;
-        fsOpDurations.addUpdateCallDuration(duration);
       }
     } finally {
       writeLock.unlock();


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