Package org.apache.solr.cloud
Class Overseer
- java.lang.Object
-
- org.apache.solr.cloud.Overseer
-
- All Implemented Interfaces:
Closeable,AutoCloseable,SolrCloseable
public class Overseer extends Object implements SolrCloseable
Cluster leader. Responsible for processing state updates, node assignments, creating/deleting collections, shards, replicas and setting various properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOverseer.OverseerThread
-
Field Summary
Fields Modifier and Type Field Description static intNUM_RESPONSES_TO_STOREstatic StringOVERSEER_ELECTstatic StringQUEUE_OPERATIONstatic intSTATE_UPDATE_BATCH_SIZEstatic intSTATE_UPDATE_DELAYstatic intSTATE_UPDATE_MAX_QUEUE
-
Constructor Summary
Constructors Constructor Description Overseer(HttpShardHandler shardHandler, UpdateShardHandler updateShardHandler, String adminPath, ZkStateReader reader, ZkController zkController, CloudConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CoreContainergetCoreContainer()SolrCloudManagergetSolrCloudManager()StatsgetStats()Overseer.OverseerThreadgetTriggerThread()For tests.Overseer.OverseerThreadgetUpdaterThread()For tests.ZkStateReadergetZkStateReader()booleanisClosed()static booleanisLegacy(ClusterStateProvider clusterStateProvider)static booleanisLegacy(ZkStateReader stateReader)voidofferStateUpdate(byte[] data)voidstart(String id)voidsystemCollectionCompatCheck(BiConsumer<String,Object> consumer)
-
-
-
Field Detail
-
QUEUE_OPERATION
public static final String QUEUE_OPERATION
- See Also:
- Constant Field Values
-
STATE_UPDATE_DELAY
public static final int STATE_UPDATE_DELAY
-
STATE_UPDATE_BATCH_SIZE
public static final int STATE_UPDATE_BATCH_SIZE
-
STATE_UPDATE_MAX_QUEUE
public static final int STATE_UPDATE_MAX_QUEUE
- See Also:
- Constant Field Values
-
NUM_RESPONSES_TO_STORE
public static final int NUM_RESPONSES_TO_STORE
- See Also:
- Constant Field Values
-
OVERSEER_ELECT
public static final String OVERSEER_ELECT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Overseer
public Overseer(HttpShardHandler shardHandler, UpdateShardHandler updateShardHandler, String adminPath, ZkStateReader reader, ZkController zkController, CloudConfig config) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
-
Method Detail
-
start
public void start(String id)
-
systemCollectionCompatCheck
public void systemCollectionCompatCheck(BiConsumer<String,Object> consumer)
-
getStats
public Stats getStats()
-
getCoreContainer
public CoreContainer getCoreContainer()
-
getSolrCloudManager
public SolrCloudManager getSolrCloudManager()
-
getUpdaterThread
public Overseer.OverseerThread getUpdaterThread()
For tests.- Returns:
- state updater thread
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
getTriggerThread
public Overseer.OverseerThread getTriggerThread()
For tests.- Returns:
- trigger thread
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceSolrCloseable
-
isLegacy
public static boolean isLegacy(ZkStateReader stateReader)
-
isLegacy
public static boolean isLegacy(ClusterStateProvider clusterStateProvider)
-
getZkStateReader
public ZkStateReader getZkStateReader()
-
offerStateUpdate
public void offerStateUpdate(byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
-