HADOOP-11271. Use Time.monotonicNow() in Shell.java instead of Time.now() (Contributed by Vinayakumar B)
This commit is contained in:
parent
73e601259f
commit
8e9502e05d
@ -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
|
||||
|
@ -449,7 +449,7 @@ protected void setWorkingDirectory(File dir) {
|
||||
|
||||
/** 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 @@ public void run() {
|
||||
LOG.warn("Error while closing the error stream", ioe);
|
||||
}
|
||||
process.destroy();
|
||||
lastTime = Time.now();
|
||||
lastTime = Time.monotonicNow();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user