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

This commit is contained in:
Vinayakumar B 2014-11-05 14:47:52 +05:30
parent 73e601259f
commit 8e9502e05d
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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();
}
}