Repository: helix Updated Branches: refs/heads/master abc6969d7 -> 54158099a
Skip resources with state model def ref as Task Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/54158099 Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/54158099 Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/54158099 Branch: refs/heads/master Commit: 54158099abe38e18229ae74e4707eb4c822405ec Parents: abc6969 Author: Harry Zhang <[email protected]> Authored: Wed Nov 14 14:42:04 2018 -0800 Committer: Harry Zhang <[email protected]> Committed: Wed Nov 14 14:42:04 2018 -0800 ---------------------------------------------------------------------- .../helix/controller/stages/TopStateHandoffReportStage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/54158099/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java b/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java index d86e430..4b60e8b 100644 --- a/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java +++ b/helix-core/src/main/java/org/apache/helix/controller/stages/TopStateHandoffReportStage.java @@ -42,6 +42,7 @@ public class TopStateHandoffReportStage extends AbstractBaseStage { private static final long DEFAULT_HANDOFF_USER_LATENCY = 0L; private static Logger LOG = LoggerFactory.getLogger(TopStateHandoffReportStage.class); public static final long TIMESTAMP_NOT_RECORDED = -1L; + private static final String TASK_STATE_MODEL_NAME = "Task"; @Override public void process(ClusterEvent event) throws Exception { @@ -88,7 +89,8 @@ public class TopStateHandoffReportStage extends AbstractBaseStage { for (Resource resource : resourceMap.values()) { StateModelDefinition stateModelDef = cache.getStateModelDef(resource.getStateModelDefRef()); - if (stateModelDef == null) { + if (stateModelDef == null || resource.getStateModelDefRef() + .equalsIgnoreCase(TASK_STATE_MODEL_NAME)) { // Resource does not have valid state model, just skip processing continue; }
