You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by et...@apache.org on 2021/04/27 15:58:38 UTC

[storm] branch 2.2.x-branch updated: [MINOR] fix time unit of scheduling time (#3394)

This is an automated email from the ASF dual-hosted git repository.

ethanli pushed a commit to branch 2.2.x-branch
in repository https://gitbox.apache.org/repos/asf/storm.git


The following commit(s) were added to refs/heads/2.2.x-branch by this push:
     new 7102f59  [MINOR] fix time unit of scheduling time (#3394)
7102f59 is described below

commit 7102f59a03ea18ca65697337a6e6b593baf36c44
Author: Meng (Ethan) Li <et...@gmail.com>
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 db548bc..83be964 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
@@ -2273,10 +2273,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()));