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 class
Overseer.OverseerThread
-
Field Summary
Fields Modifier and Type Field Description static int
NUM_RESPONSES_TO_STORE
static String
OVERSEER_ELECT
static String
QUEUE_OPERATION
static int
STATE_UPDATE_BATCH_SIZE
static int
STATE_UPDATE_DELAY
static int
STATE_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 void
close()
CoreContainer
getCoreContainer()
SolrCloudManager
getSolrCloudManager()
Stats
getStats()
Overseer.OverseerThread
getTriggerThread()
For tests.Overseer.OverseerThread
getUpdaterThread()
For tests.ZkStateReader
getZkStateReader()
boolean
isClosed()
static boolean
isLegacy(ClusterStateProvider clusterStateProvider)
static boolean
isLegacy(ZkStateReader stateReader)
void
offerStateUpdate(byte[] data)
void
start(String id)
void
systemCollectionCompatCheck(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.KeeperException
InterruptedException
-
-
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in 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.KeeperException
InterruptedException
-
-