Class BaseBrokerStarter
- java.lang.Object
-
- org.apache.pinot.broker.broker.helix.BaseBrokerStarter
-
- All Implemented Interfaces:
org.apache.pinot.spi.services.ServiceStartable
- Direct Known Subclasses:
HelixBrokerStarter
public abstract class BaseBrokerStarter extends Object implements org.apache.pinot.spi.services.ServiceStartable
Base class for broker startable implementations
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description BaseBrokerStarter()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addExternalViewChangeHandler(ClusterChangeHandler externalViewChangeHandler)
Adds an external view change handler to handle Helix external view change callbacks.void
addIdealStateChangeHandler(ClusterChangeHandler idealStateChangeHandler)
Adds an ideal state change handler to handle Helix ideal state change callbacks.void
addInstanceConfigChangeHandler(ClusterChangeHandler instanceConfigChangeHandler)
Adds an instance config change handler to handle Helix instance config change callbacks.void
addLiveInstanceChangeHandler(ClusterChangeHandler liveInstanceChangeHandler)
Adds a live instance change handler to handle Helix live instance change callbacks.protected BrokerAdminApiApplication
createBrokerAdminApp()
AccessControlFactory
getAccessControlFactory()
org.apache.pinot.common.metrics.BrokerMetrics
getBrokerMetrics()
BrokerRequestHandler
getBrokerRequestHandler()
org.apache.pinot.spi.env.PinotConfiguration
getConfig()
String
getInstanceId()
org.apache.pinot.spi.metrics.PinotMetricsRegistry
getMetricsRegistry()
int
getPort()
BrokerRoutingManager
getRoutingManager()
org.apache.pinot.spi.services.ServiceRole
getServiceRole()
org.apache.helix.HelixManager
getSpectatorHelixManager()
void
init(org.apache.pinot.spi.env.PinotConfiguration brokerConf)
boolean
isShuttingDown()
boolean
isStarting()
protected void
registerExtraComponents(BrokerAdminApiApplication brokerAdminApplication)
Deprecated.UsecreateBrokerAdminApp()
instead.void
start()
void
stop()
-
-
-
Field Detail
-
_brokerConf
protected org.apache.pinot.spi.env.PinotConfiguration _brokerConf
-
_listenerConfigs
protected List<ListenerConfig> _listenerConfigs
-
_clusterName
protected String _clusterName
-
_zkServers
protected String _zkServers
-
_hostname
protected String _hostname
-
_port
protected int _port
-
_tlsPort
protected int _tlsPort
-
_instanceId
protected String _instanceId
-
_idealStateChangeHandlers
protected final List<ClusterChangeHandler> _idealStateChangeHandlers
-
_externalViewChangeHandlers
protected final List<ClusterChangeHandler> _externalViewChangeHandlers
-
_instanceConfigChangeHandlers
protected final List<ClusterChangeHandler> _instanceConfigChangeHandlers
-
_liveInstanceChangeHandlers
protected final List<ClusterChangeHandler> _liveInstanceChangeHandlers
-
_spectatorHelixManager
protected org.apache.helix.HelixManager _spectatorHelixManager
-
_helixAdmin
protected org.apache.helix.HelixAdmin _helixAdmin
-
_propertyStore
protected org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> _propertyStore
-
_helixDataAccessor
protected org.apache.helix.HelixDataAccessor _helixDataAccessor
-
_metricsRegistry
protected org.apache.pinot.spi.metrics.PinotMetricsRegistry _metricsRegistry
-
_brokerMetrics
protected org.apache.pinot.common.metrics.BrokerMetrics _brokerMetrics
-
_routingManager
protected BrokerRoutingManager _routingManager
-
_accessControlFactory
protected AccessControlFactory _accessControlFactory
-
_brokerRequestHandler
protected BrokerRequestHandler _brokerRequestHandler
-
_sqlQueryExecutor
protected SqlQueryExecutor _sqlQueryExecutor
-
_brokerAdminApplication
protected BrokerAdminApiApplication _brokerAdminApplication
-
_clusterChangeMediator
protected ClusterChangeMediator _clusterChangeMediator
-
_participantHelixManager
protected org.apache.helix.HelixManager _participantHelixManager
-
_serverRoutingStatsManager
protected ServerRoutingStatsManager _serverRoutingStatsManager
-
-
Method Detail
-
init
public void init(org.apache.pinot.spi.env.PinotConfiguration brokerConf) throws Exception
- Specified by:
init
in interfaceorg.apache.pinot.spi.services.ServiceStartable
- Throws:
Exception
-
getPort
public int getPort()
-
addIdealStateChangeHandler
public void addIdealStateChangeHandler(ClusterChangeHandler idealStateChangeHandler)
Adds an ideal state change handler to handle Helix ideal state change callbacks.NOTE: all change handlers will be run in a single thread, so any slow change handler can block other change handlers from running. For slow change handler, make it asynchronous.
-
addExternalViewChangeHandler
public void addExternalViewChangeHandler(ClusterChangeHandler externalViewChangeHandler)
Adds an external view change handler to handle Helix external view change callbacks.NOTE: all change handlers will be run in a single thread, so any slow change handler can block other change handlers from running. For slow change handler, make it asynchronous.
-
addInstanceConfigChangeHandler
public void addInstanceConfigChangeHandler(ClusterChangeHandler instanceConfigChangeHandler)
Adds an instance config change handler to handle Helix instance config change callbacks.NOTE: all change handlers will be run in a single thread, so any slow change handler can block other change handlers from running. For slow change handler, make it asynchronous.
-
addLiveInstanceChangeHandler
public void addLiveInstanceChangeHandler(ClusterChangeHandler liveInstanceChangeHandler)
Adds a live instance change handler to handle Helix live instance change callbacks.NOTE: all change handlers will be run in a single thread, so any slow change handler can block other change handlers from running. For slow change handler, make it asynchronous.
-
getServiceRole
public org.apache.pinot.spi.services.ServiceRole getServiceRole()
- Specified by:
getServiceRole
in interfaceorg.apache.pinot.spi.services.ServiceStartable
-
getInstanceId
public String getInstanceId()
- Specified by:
getInstanceId
in interfaceorg.apache.pinot.spi.services.ServiceStartable
-
getConfig
public org.apache.pinot.spi.env.PinotConfiguration getConfig()
- Specified by:
getConfig
in interfaceorg.apache.pinot.spi.services.ServiceStartable
-
start
public void start() throws Exception
- Specified by:
start
in interfaceorg.apache.pinot.spi.services.ServiceStartable
- Throws:
Exception
-
registerExtraComponents
protected void registerExtraComponents(BrokerAdminApiApplication brokerAdminApplication)
Deprecated.UsecreateBrokerAdminApp()
instead. This method is called after initialization of BrokerAdminApiApplication object and before calling start to allow custom broker starters to register additional components.- Parameters:
brokerAdminApplication
- is the application
-
stop
public void stop()
- Specified by:
stop
in interfaceorg.apache.pinot.spi.services.ServiceStartable
-
isStarting
public boolean isStarting()
-
isShuttingDown
public boolean isShuttingDown()
-
getSpectatorHelixManager
public org.apache.helix.HelixManager getSpectatorHelixManager()
-
getMetricsRegistry
public org.apache.pinot.spi.metrics.PinotMetricsRegistry getMetricsRegistry()
-
getBrokerMetrics
public org.apache.pinot.common.metrics.BrokerMetrics getBrokerMetrics()
-
getRoutingManager
public BrokerRoutingManager getRoutingManager()
-
getAccessControlFactory
public AccessControlFactory getAccessControlFactory()
-
getBrokerRequestHandler
public BrokerRequestHandler getBrokerRequestHandler()
-
createBrokerAdminApp
protected BrokerAdminApiApplication createBrokerAdminApp()
-
-