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 2018/06/18 21:36:33 UTC
[incubator-heron] 02/02: update comment
This is an automated email from the ASF dual-hosted git repository.
huijun pushed a commit to branch huijunw/togglepolicy
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
commit 39931faded90e76e5661ab3dd7ab31a79cbe93ea
Author: Huijun Wu <hu...@twitter.com>
AuthorDate: Mon Jun 18 14:30:39 2018 -0700
update comment
---
.../org/apache/heron/healthmgr/policy/ToggleablePolicy.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/heron/healthmgr/src/java/org/apache/heron/healthmgr/policy/ToggleablePolicy.java b/heron/healthmgr/src/java/org/apache/heron/healthmgr/policy/ToggleablePolicy.java
index 282361e..7656abb 100644
--- a/heron/healthmgr/src/java/org/apache/heron/healthmgr/policy/ToggleablePolicy.java
+++ b/heron/healthmgr/src/java/org/apache/heron/healthmgr/policy/ToggleablePolicy.java
@@ -36,7 +36,7 @@ import org.apache.heron.healthmgr.common.PhysicalPlanProvider;
/**
* This Policy class
- * 1. has a switch
+ * 1. has a toggle switch
* 2. works with runtime config
*/
public class ToggleablePolicy extends HealthPolicyImpl {
@@ -50,12 +50,6 @@ public class ToggleablePolicy extends HealthPolicyImpl {
protected PhysicalPlanProvider physicalPlanProvider;
protected boolean running = true;
-// @Inject
-// ToggleablePolicy(PhysicalPlanProvider physicalPlanProvider) {
-// running = true;
-// this.physicalPlanProvider = physicalPlanProvider;
-// }
-
@Override
public Collection<Measurement> executeSensors() {
for (TopologyAPI.Config.KeyValue kv
@@ -109,6 +103,11 @@ public class ToggleablePolicy extends HealthPolicyImpl {
if (running) {
return super.executeResolvers(diagnosis);
} else {
+ /*
+ * TODO(dhalion):
+ * If sub-class could access the `lastExecutionTimestamp`
+ * and `oneTimeDelay`, avoid super method invocation.
+ */
return super.executeResolvers(new ArrayList<Diagnosis>());
}
}