This is an automated email from the ASF dual-hosted git repository.
ethanli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new 72a56da [MINOR] fix time unit of scheduling time (#3394)
72a56da is described below
commit 72a56dafa767309856dc1549e2a0aec4f60c81e7
Author: Meng (Ethan) Li <[email protected]>
AuthorDate: Tue Apr 27 10:56:07 2021 -0500
[MINOR] fix time unit of scheduling time (#3394)
---
.../src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
index 9f1bfea..e1d6fbe 100644
--- a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
+++ b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java
@@ -2281,10 +2281,10 @@ public class Nimbus implements Iface, Shutdownable,
DaemonCommon {
scheduler.schedule(topologies, cluster);
//Get and set the start time before getting current time in order to
avoid potential race with the longest-scheduling-time-ms gauge
final Long startTime = schedulingStartTimeNs.getAndSet(null);
- long elapsed = Time.nanoTime() - startTime;
- longestSchedulingTime.accumulateAndGet(elapsed, Math::max);
- schedulingDuration.update(elapsed, TimeUnit.NANOSECONDS);
- LOG.debug("Scheduling took {} ms for {} topologies", elapsed,
topologies.getTopologies().size());
+ long elapsedNs = Time.nanoTime() - startTime;
+ longestSchedulingTime.accumulateAndGet(elapsedNs, Math::max);
+ schedulingDuration.update(elapsedNs, TimeUnit.NANOSECONDS);
+ LOG.debug("Scheduling took {} ms for {} topologies",
TimeUnit.NANOSECONDS.toMillis(elapsedNs), topologies.getTopologies().size());
//merge with existing statuses
idToSchedStatus.set(Utils.merge(idToSchedStatus.get(),
cluster.getStatusMap()));