Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 fa8e411d4 -> c8d494197


HADOOP-14293. Initialize FakeTimer with a less trivial value.

(cherry picked from commit be144117a885cb39bc192279c96cbe3790dc77b1)
(cherry picked from commit dab1deb9a0c96471b6da4ef95be86cbc81d55305)


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

Branch: refs/heads/branch-2.8
Commit: c8d494197f95d347be96651b3e8586b9f604b327
Parents: fa8e411
Author: Andrew Wang <[email protected]>
Authored: Mon Apr 10 11:37:01 2017 -0700
Committer: Andrew Wang <[email protected]>
Committed: Mon Apr 10 11:37:35 2017 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/hadoop/util/FakeTimer.java           | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c8d49419/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
index 2b5f850..1b17ce7 100644
--- 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
+++ 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/FakeTimer.java
@@ -33,7 +33,8 @@ public class FakeTimer extends Timer {
 
   /** Constructs a FakeTimer with a non-zero value */
   public FakeTimer() {
-    nowNanos = 1000;  // Initialize with a non-trivial value.
+    // Initialize with a non-trivial value.
+    nowNanos = TimeUnit.MILLISECONDS.toNanos(1000);
   }
 
   @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to