From b3d5d269a73a1826ebf6f637a0dbd69f6261dbcb Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Mon, 29 Sep 2014 11:29:54 -0700 Subject: [PATCH] HDFS-7157. Using Time.now() for recording start/end time of reconfiguration tasks (Lei Xu via Colin Patrick McCabe) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../main/java/org/apache/hadoop/conf/ReconfigurableBase.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index d6be9f024d..0a14ecddf3 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -758,6 +758,9 @@ Release 2.6.0 - UNRELEASED HADOOP-11140. hadoop-aws only need test-scoped dependency on hadoop-common's tests jar. (Juan Yu via wang) + HDFS-7157. Using Time.now() for recording start/end time of reconfiguration + tasks (Lei Xu via cmccabe) + BREAKDOWN OF HDFS-6134 AND HADOOP-10150 SUBTASKS AND RELATED JIRAS HADOOP-10734. Implement high-performance secure random number sources. diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java index 7521650e6f..3248b9a133 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java @@ -134,7 +134,7 @@ public void run() { } synchronized (this.parent.reconfigLock) { - this.parent.endTime = Time.monotonicNow(); + this.parent.endTime = Time.now(); this.parent.status = Collections.unmodifiableMap(results); this.parent.reconfigThread = null; } @@ -160,7 +160,7 @@ public void startReconfigurationTask() throws IOException { reconfigThread.setDaemon(true); reconfigThread.setName("Reconfiguration Task"); reconfigThread.start(); - startTime = Time.monotonicNow(); + startTime = Time.now(); } }