HADOOP-11271. Use Time.monotonicNow() in Shell.java instead of Time.now() (Contributed by Vinayakumar B)
(cherry picked from commit 8e9502e05d
)
This commit is contained in:
parent
46c29b988d
commit
2d0c56e898
|
@ -54,6 +54,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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue