tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbalamo...@apache.org
Subject [2/2] git commit: TEZ-1725. Fix nanosecond to millis conversion in TezMxBeanResourceCalculator (Rajesh Balamohan) (Cherry picked from commit b66ff72cc02d333d36c312562b7f06ac174e9830)
Date Fri, 31 Oct 2014 06:53:48 GMT
TEZ-1725. Fix nanosecond to millis conversion in TezMxBeanResourceCalculator  (Rajesh Balamohan)
(Cherry picked from commit b66ff72cc02d333d36c312562b7f06ac174e9830)


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

Branch: refs/heads/branch-0.5
Commit: 837a8c0f2974be03d840532a58ec764c385dc2d4
Parents: 2a9a105
Author: Rajesh Balamohan <rbalamohan@apache.org>
Authored: Fri Oct 31 12:22:59 2014 +0530
Committer: Rajesh Balamohan <rbalamohan@apache.org>
Committed: Fri Oct 31 12:23:13 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                     | 1 +
 tez-plugins/pom.xml                                             | 4 +++-
 .../java/org/apache/tez/util/TezMxBeanResourceCalculator.java   | 5 +----
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/837a8c0f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 77626f0..c3844b5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -88,6 +88,7 @@ ALL CHANGES:
   TEZ-1703. Exception handling for InputInitializer.
   TEZ-1698. Cut down on ResourceCalculatorProcessTree overheads in Tez.
   TEZ-1703. addendum - fix flaky test.
+  TEZ-1725. Fix nanosecond to millis conversion in TezMxBeanResourceCalculator.
 
 Release 0.5.1: 2014-10-02
 

http://git-wip-us.apache.org/repos/asf/tez/blob/837a8c0f/tez-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/tez-plugins/pom.xml b/tez-plugins/pom.xml
index 25bc311..de1a54f 100644
--- a/tez-plugins/pom.xml
+++ b/tez-plugins/pom.xml
@@ -30,7 +30,9 @@
     <profile>
       <id>hadoop24</id>
       <activation>
-         <activeByDefault>true</activeByDefault>
+        <property>
+          <name>!skipATS</name>
+        </property>
       </activation>
       <modules>
         <module>tez-yarn-timeline-history</module>

http://git-wip-us.apache.org/repos/asf/tez/blob/837a8c0f/tez-plugins/tez-mbeans-resource-calculator/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
----------------------------------------------------------------------
diff --git a/tez-plugins/tez-mbeans-resource-calculator/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
b/tez-plugins/tez-mbeans-resource-calculator/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
index 330a2fd..4aa8f85 100644
--- a/tez-plugins/tez-mbeans-resource-calculator/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
+++ b/tez-plugins/tez-mbeans-resource-calculator/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
@@ -31,7 +31,6 @@ public class TezMxBeanResourceCalculator extends ResourceCalculatorProcessTree
{
 
   private final com.sun.management.OperatingSystemMXBean osBean;
   private final Runtime runtime;
-  private final AtomicLong cumulativeCPU;
 
   /**
    * Create process-tree instance with specified root process.
@@ -45,7 +44,6 @@ public class TezMxBeanResourceCalculator extends ResourceCalculatorProcessTree
{
     runtime = Runtime.getRuntime();
     osBean =
         (com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
-    cumulativeCPU = new AtomicLong();
   }
 
   @Override public void updateProcessTree() {
@@ -67,8 +65,7 @@ public class TezMxBeanResourceCalculator extends ResourceCalculatorProcessTree
{
 
   @Override public long getCumulativeCpuTime() {
     //convert to milliseconds
-    return TimeUnit.MILLISECONDS.convert(cumulativeCPU.addAndGet(osBean.getProcessCpuTime()),
-        TimeUnit.MILLISECONDS);
+    return TimeUnit.MILLISECONDS.convert(osBean.getProcessCpuTime(), TimeUnit.NANOSECONDS);
   }
 
   @Override public boolean checkPidPgrpidForMatch() {


Mime
View raw message