HADOOP-14894. ReflectionUtils should use Time.monotonicNow to mesaure duration. Contributed by Bharat Viswanadham.
This commit is contained in:
parent
2a81af447f
commit
1c4a798505
|
@ -212,7 +212,7 @@ public class ReflectionUtils {
|
|||
boolean dumpStack = false;
|
||||
if (log.isInfoEnabled()) {
|
||||
synchronized (ReflectionUtils.class) {
|
||||
long now = Time.now();
|
||||
long now = Time.monotonicNow();
|
||||
if (now - previousLogTime >= minInterval * 1000) {
|
||||
previousLogTime = now;
|
||||
dumpStack = true;
|
||||
|
@ -241,7 +241,7 @@ public class ReflectionUtils {
|
|||
boolean dumpStack = false;
|
||||
if (log.isInfoEnabled()) {
|
||||
synchronized (ReflectionUtils.class) {
|
||||
long now = Time.now();
|
||||
long now = Time.monotonicNow();
|
||||
if (now - previousLogTime >= minInterval * 1000) {
|
||||
previousLogTime = now;
|
||||
dumpStack = true;
|
||||
|
|
Loading…
Reference in New Issue