Repository: hadoop
Updated Branches:
  refs/heads/trunk 73e601259 -> 8e9502e05


HADOOP-11271. Use Time.monotonicNow() in Shell.java instead of Time.now() 
(Contributed by Vinayakumar B)


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

Branch: refs/heads/trunk
Commit: 8e9502e05d09e31b76fda7cc6691e78a39db8de6
Parents: 73e6012
Author: Vinayakumar B <vinayakum...@apache.org>
Authored: Wed Nov 5 14:47:52 2014 +0530
Committer: Vinayakumar B <vinayakum...@apache.org>
Committed: Wed Nov 5 14:47:52 2014 +0530

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                  | 3 +++
 .../src/main/java/org/apache/hadoop/util/Shell.java              | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e9502e0/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt 
b/hadoop-common-project/hadoop-common/CHANGES.txt
index 7827270..4bfe46b 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -397,6 +397,9 @@ Release 2.7.0 - UNRELEASED
 
     HADOOP-11269. Add java 8 profile for hadoop-annotations. (Li Lu via wheat9)
 
+    HADOOP-11271. Use Time.monotonicNow() in Shell.java instead of Time.now()
+    (vinayakumarb)
+
 Release 2.6.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e9502e0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
index bd25b9d..a44e992 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
@@ -449,7 +449,7 @@ abstract public class Shell {
 
   /** check to see if a command needs to be executed and execute if needed */
   protected void run() throws IOException {
-    if (lastTime + interval > Time.now())
+    if (lastTime + interval > Time.monotonicNow())
       return;
     exitCode = 0; // reset for next run
     runCommand();
@@ -578,7 +578,7 @@ abstract public class Shell {
         LOG.warn("Error while closing the error stream", ioe);
       }
       process.destroy();
-      lastTime = Time.now();
+      lastTime = Time.monotonicNow();
     }
   }
 

Reply via email to