Class NodeMutator


  • public class NodeMutator
    extends Object
    • Field Detail

      • zkClient

        protected org.apache.solr.common.cloud.SolrZkClient zkClient
    • Constructor Detail

      • NodeMutator

        public NodeMutator​(org.apache.solr.client.solrj.cloud.SolrCloudManager cloudManager)
    • 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.