tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhiyu...@apache.org
Subject tez git commit: TEZ-3675. Handle changes to ResourceCalculatorProcessTree in YARN-3427 for Hadoop 3.x (zhiyuany)
Date Fri, 21 Apr 2017 22:13:27 GMT
Repository: tez
Updated Branches:
  refs/heads/master f16b5bffb -> bb4fb6471


TEZ-3675. Handle changes to ResourceCalculatorProcessTree in YARN-3427 for Hadoop 3.x (zhiyuany)


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

Branch: refs/heads/master
Commit: bb4fb6471735a5cae3647f8c7a6999baf21238ff
Parents: f16b5bf
Author: Zhiyuan Yang <zhiyuany@apache.org>
Authored: Fri Apr 21 15:13:08 2017 -0700
Committer: Zhiyuan Yang <zhiyuany@apache.org>
Committed: Fri Apr 21 15:13:08 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/tez/util/TezMxBeanResourceCalculator.java    | 4 ++--
 .../org/apache/tez/util/TestTezMxBeanResourceCalculator.java     | 4 ++--
 .../java/org/apache/tez/runtime/metrics/TaskCounterUpdater.java  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/bb4fb647/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
----------------------------------------------------------------------
diff --git a/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
b/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
index 07f34e6..4a11a8a 100644
--- a/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
+++ b/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
@@ -58,7 +58,7 @@ public class TezMxBeanResourceCalculator extends ResourceCalculatorProcessTree
{
     return "";
   }
 
-  @Override public long getCumulativeVmem(int olderThanAge) {
+  @Override public long getVirtualMemorySize(int olderThanAge) {
     try {
       return (Long) getCommittedVirtualMemorySize.invoke(osBean);
     } catch (IllegalArgumentException e) {
@@ -70,7 +70,7 @@ public class TezMxBeanResourceCalculator extends ResourceCalculatorProcessTree
{
     }
   }
 
-  @Override public long getCumulativeRssmem(int olderThanAge) {
+  @Override public long getRssMemorySize(int olderThanAge) {
     //Not supported directly (RSS ~= memory consumed by JVM from Xmx)
     return runtime.totalMemory();
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/bb4fb647/tez-common/src/test/java/org/apache/tez/util/TestTezMxBeanResourceCalculator.java
----------------------------------------------------------------------
diff --git a/tez-common/src/test/java/org/apache/tez/util/TestTezMxBeanResourceCalculator.java
b/tez-common/src/test/java/org/apache/tez/util/TestTezMxBeanResourceCalculator.java
index 4be8229..803118a 100644
--- a/tez-common/src/test/java/org/apache/tez/util/TestTezMxBeanResourceCalculator.java
+++ b/tez-common/src/test/java/org/apache/tez/util/TestTezMxBeanResourceCalculator.java
@@ -52,8 +52,8 @@ public class TestTezMxBeanResourceCalculator {
   public void testResourceCalculator() {
     Assert.assertTrue(resourceCalculator instanceof TezMxBeanResourceCalculator);
     Assert.assertTrue(resourceCalculator.getCumulativeCpuTime() > 0);
-    Assert.assertTrue(resourceCalculator.getCumulativeVmem() > 0);
-    Assert.assertTrue(resourceCalculator.getCumulativeRssmem() > 0);
+    Assert.assertTrue(resourceCalculator.getVirtualMemorySize() > 0);
+    Assert.assertTrue(resourceCalculator.getRssMemorySize() > 0);
     Assert.assertTrue(resourceCalculator.getProcessTreeDump().equals(""));
     Assert.assertTrue(resourceCalculator.checkPidPgrpidForMatch());
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/bb4fb647/tez-runtime-internals/src/main/java/org/apache/tez/runtime/metrics/TaskCounterUpdater.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/metrics/TaskCounterUpdater.java
b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/metrics/TaskCounterUpdater.java
index 2472c51..48676e2 100644
--- a/tez-runtime-internals/src/main/java/org/apache/tez/runtime/metrics/TaskCounterUpdater.java
+++ b/tez-runtime-internals/src/main/java/org/apache/tez/runtime/metrics/TaskCounterUpdater.java
@@ -122,8 +122,8 @@ public class TaskCounterUpdater {
     }
     pTree.updateProcessTree();
     long cpuTime = pTree.getCumulativeCpuTime();
-    long pMem = pTree.getCumulativeRssmem();
-    long vMem = pTree.getCumulativeVmem();
+    long pMem = pTree.getRssMemorySize();
+    long vMem = pTree.getVirtualMemorySize();
     // Remove the CPU time consumed previously by JVM reuse
     cpuTime -= initCpuCumulativeTime;
     tezCounters.findCounter(TaskCounter.CPU_MILLISECONDS).setValue(cpuTime);


Mime
View raw message