hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: MAPREDUCE-6965. QuasiMonteCarlo should use Time.monotonicNow for measuring durations. Contributed by Chetna Chaudhari
Date Fri, 22 Sep 2017 14:37:25 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 d80e2f2ea -> b94acb6ef


MAPREDUCE-6965. QuasiMonteCarlo should use Time.monotonicNow for measuring durations. Contributed
by Chetna Chaudhari

(cherry picked from commit 908d8e914ef55aca69cb8e725e62bda29d1073cc)


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

Branch: refs/heads/branch-2
Commit: b94acb6efb2b8886966771f06b3a82ae65abb466
Parents: d80e2f2
Author: Jason Lowe <jlowe@apache.org>
Authored: Fri Sep 22 09:34:53 2017 -0500
Committer: Jason Lowe <jlowe@apache.org>
Committed: Fri Sep 22 09:37:09 2017 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b94acb6e/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
index 1a0c372..67f0fef 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/QuasiMonteCarlo.java
@@ -38,6 +38,7 @@ import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
 import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;
+import org.apache.hadoop.util.Time;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
@@ -302,13 +303,13 @@ public class QuasiMonteCarlo extends Configured implements Tool {
   
       //start a map/reduce job
       System.out.println("Starting Job");
-      final long startTime = System.currentTimeMillis();
+      final long startTime = Time.monotonicNow();
       job.waitForCompletion(true);
       if (!job.isSuccessful()) {
         System.out.println("Job " + job.getJobID() + " failed!");
         System.exit(1);
       }
-      final double duration = (System.currentTimeMillis() - startTime)/1000.0;
+      final double duration = (Time.monotonicNow() - startTime)/1000.0;
       System.out.println("Job Finished in " + duration + " seconds");
 
       //read outputs


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