Fix JobQueue ignoring FailedThreshold Since JobQueue is dynamic queue running, JobQueue should not be failed due to job failed threshold.
Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/8efb359d Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/8efb359d Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/8efb359d Branch: refs/heads/master Commit: 8efb359dcd0f076db0d838cd50387094161c4d1d Parents: 2804cd0 Author: Junkai Xue <[email protected]> Authored: Mon Sep 25 15:06:08 2017 -0700 Committer: Junkai Xue <[email protected]> Committed: Mon Sep 25 15:19:04 2017 -0700 ---------------------------------------------------------------------- .../apache/helix/controller/stages/BestPossibleStateCalcStage.java | 1 - helix-core/src/main/java/org/apache/helix/task/TaskRebalancer.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/8efb359d/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java b/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java index fbb7f86..f2e9da7 100644 --- a/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java +++ b/helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java @@ -155,7 +155,6 @@ public class BestPossibleStateCalcStage extends AbstractBaseStage { HelixManager manager = event.getAttribute("helixmanager"); rebalancer.init(manager); idealState = rebalancer.computeNewIdealState(resourceName, idealState, currentStateOutput, cache); - output.setPreferenceLists(resourceName, idealState.getPreferenceLists()); // Use the internal MappingCalculator interface to compute the final assignment // The next release will support rebalancers that compute the mapping from start to finish http://git-wip-us.apache.org/repos/asf/helix/blob/8efb359d/helix-core/src/main/java/org/apache/helix/task/TaskRebalancer.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/task/TaskRebalancer.java b/helix-core/src/main/java/org/apache/helix/task/TaskRebalancer.java index 569e789..312c499 100644 --- a/helix-core/src/main/java/org/apache/helix/task/TaskRebalancer.java +++ b/helix-core/src/main/java/org/apache/helix/task/TaskRebalancer.java @@ -77,7 +77,7 @@ public abstract class TaskRebalancer implements Rebalancer, MappingCalculator { TaskState jobState = ctx.getJobState(job); if (!cfg.isJobQueue() && jobState == TaskState.FAILED) { failedJobs ++; - if (failedJobs > cfg.getFailureThreshold()) { + if (!cfg.isJobQueue() && failedJobs > cfg.getFailureThreshold()) { ctx.setWorkflowState(TaskState.FAILED); _clusterStatusMonitor.updateWorkflowCounters(cfg, TaskState.FAILED); for (String jobToFail : cfg.getJobDag().getAllNodes()) {
