package org.apache.helix.participant;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

import org.apache.helix.participant.statemachine.StateModelFactory;

public class DistClusterControllerStateModelFactory extends
    StateModelFactory<DistClusterControllerStateModel> {
  private final String _zkAddr;

  public DistClusterControllerStateModelFactory(String zkAddr) {
    _zkAddr = zkAddr;
  }

  @Override
  public DistClusterControllerStateModel createNewStateModel(String resourceName, String partitionKey) {
    return new DistClusterControllerStateModel(_zkAddr);
  }

}

@@ -841,16 +841,131 @@
 e.%0A */%0A%0A
+import com.google.common.collect.Sets;%0Aimport java.util.Set;%0Aimport org.apache.helix.controller.pipeline.Pipeline;%0A
 import o
@@ -1173,16 +1173,74 @@
 _zkAddr;
+%0A  private final Set%3CPipeline.Type%3E _enabledPipelineTypes;
 %0A%0A  publ
@@ -1306,24 +1306,269 @@
     
-_zkAddr = zkAddr
+this(zkAddr, Sets.newHashSet(Pipeline.Type.DEFAULT, Pipeline.Type.TASK));%0A  %7D%0A%0A  public DistClusterControllerStateModelFactory(String zkAddr,%0A      Set%3CPipeline.Type%3E enabledPipelineTypes) %7B%0A    _zkAddr = zkAddr;%0A    _enabledPipelineTypes = enabledPipelineTypes
 ;%0A  
@@ -1581,18 +1581,16 @@
 Override
-%0A 
  public 
@@ -1661,16 +1661,22 @@
 rceName,
+%0A     
  String 
@@ -1745,18 +1745,40 @@
 (_zkAddr
+, _enabledPipelineTypes
 );%0A  %7D%0A
-%0A
 %7D%0A

support configuring controller pipeline in DistClusterControllerStateModelFactory