HADOOP-14293. Initialize FakeTimer with a less trivial value.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/be144117 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/be144117 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/be144117 Branch: refs/heads/HDFS-9806 Commit: be144117a885cb39bc192279c96cbe3790dc77b1 Parents: 14a3990 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:01 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/be144117/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]
