You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by hu...@apache.org on 2019/10/29 21:45:31 UTC

[incubator-heron] branch master updated: makemetricstriggerperiodic (#3384)

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

huijun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/master by this push:
     new c51faf8  makemetricstriggerperiodic (#3384)
c51faf8 is described below

commit c51faf8af10434c8022b5fc6f247363d58efe264
Author: bed debug <hu...@users.noreply.github.com>
AuthorDate: Tue Oct 29 14:45:20 2019 -0700

    makemetricstriggerperiodic (#3384)
---
 .../java/org/apache/heron/healthmgr/HealthManagerMetrics.java | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/heron/healthmgr/src/java/org/apache/heron/healthmgr/HealthManagerMetrics.java b/heron/healthmgr/src/java/org/apache/heron/healthmgr/HealthManagerMetrics.java
index 4f22cd1..5920833 100644
--- a/heron/healthmgr/src/java/org/apache/heron/healthmgr/HealthManagerMetrics.java
+++ b/heron/healthmgr/src/java/org/apache/heron/healthmgr/HealthManagerMetrics.java
@@ -102,19 +102,10 @@ public class HealthManagerMetrics implements Runnable, AutoCloseable {
     int interval = (int) systemConfig.getHeronMetricsExportInterval().getSeconds();
 
 
-    looper.registerTimerEvent(Duration.ofSeconds(interval), new Runnable() {
+    looper.registerPeriodicEvent(Duration.ofSeconds(interval), new Runnable() {
       @Override
       public void run() {
         sendMetrics();
-        // next timer task
-        if (looper != null) {
-          looper.registerTimerEvent(Duration.ofSeconds(interval), new Runnable() {
-            @Override
-            public void run() {
-              sendMetrics();
-            }
-          });
-        }
       }
     });
   }