private static PipelineRegistry createDefaultRegistry()
{
logger.info("createDefaultRegistry");
synchronized (GenericHelixController.class)
{
PipelineRegistry registry = new PipelineRegistry();
// cluster data cache refresh
Pipeline dataRefresh = new Pipeline();
dataRefresh.addStage(new ReadClusterDataStage());
// rebalance pipeline
Pipeline rebalancePipeline = new Pipeline();
rebalancePipeline.addStage(new ResourceComputationStage());
rebalancePipeline.addStage(new CurrentStateComputationStage());
rebalancePipeline.addStage(new BestPossibleStateCalcStage());
rebalancePipeline.addStage(new MessageGenerationPhase());
rebalancePipeline.addStage(new MessageSelectionStage());
rebalancePipeline.addStage(new MessageThrottleStage());
rebalancePipeline.addStage(new TaskAssignmentStage());
// external view generation
Pipeline externalViewPipeline = new Pipeline();
externalViewPipeline.addStage(new ExternalViewComputeStage());
// backward compatibility check
Pipeline liveInstancePipeline = new Pipeline();
liveInstancePipeline.addStage(new CompatibilityCheckStage());
registry.register("idealStateChange", dataRefresh, rebalancePipeline);
registry.register("currentStateChange",
dataRefresh,
rebalancePipeline,
externalViewPipeline);
registry.register("configChange", dataRefresh, rebalancePipeline);
registry.register("liveInstanceChange",
dataRefresh,
liveInstancePipeline,
rebalancePipeline,
externalViewPipeline);
registry.register("messageChange",
dataRefresh,
rebalancePipeline);
registry.register("externalView", dataRefresh);
registry.register("resume", dataRefresh, rebalancePipeline, externalViewPipeline);
registry.register("periodicalRebalance", dataRefresh, rebalancePipeline, externalViewPipeline);
// health stats pipeline
// Pipeline healthStatsAggregationPipeline = new Pipeline();
// StatsAggregationStage statsStage = new StatsAggregationStage();
// healthStatsAggregationPipeline.addStage(new ReadHealthDataStage());