Package org.apache.solr.cloud.overseer
Class NodeMutator
- java.lang.Object
-
- org.apache.solr.cloud.overseer.NodeMutator
-
public class NodeMutator extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.solr.common.cloud.SolrZkClient
zkClient
-
Constructor Summary
Constructors Constructor Description NodeMutator(org.apache.solr.client.solrj.cloud.SolrCloudManager cloudManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<ZkWriteCommand>
computeCollectionUpdate(String nodeName, String collectionName, org.apache.solr.common.cloud.DocCollection docCollection, org.apache.solr.common.cloud.SolrZkClient client)
Returns the write command needed to update the replicas of a given collection given the identity of a node being down.List<ZkWriteCommand>
downNode(org.apache.solr.common.cloud.ClusterState clusterState, org.apache.solr.common.cloud.ZkNodeProps message)
-
-
-
Method Detail
-
downNode
public List<ZkWriteCommand> downNode(org.apache.solr.common.cloud.ClusterState clusterState, org.apache.solr.common.cloud.ZkNodeProps message)
-
computeCollectionUpdate
public static Optional<ZkWriteCommand> computeCollectionUpdate(String nodeName, String collectionName, org.apache.solr.common.cloud.DocCollection docCollection, org.apache.solr.common.cloud.SolrZkClient client)
Returns the write command needed to update the replicas of a given collection given the identity of a node being down.- Returns:
- An optional with the write command or an empty one if the collection does not need any state modification. The returned write command might be for per replica state updates or for an update to state.json, depending on the configuration of the collection.
-
-