Class BalanceRequestImpl
java.lang.Object
org.apache.solr.cluster.placement.impl.BalanceRequestImpl
- All Implemented Interfaces:
BalanceRequest,ModificationRequest
-
Constructor Summary
ConstructorsConstructorDescriptionBalanceRequestImpl(Set<Node> nodes) BalanceRequestImpl(Set<Node> nodes, int maximumBalanceSkew) -
Method Summary
Modifier and TypeMethodDescriptionTheSolrCollectionto modify.intgetNodes()Replicas should only be balanced on nodes in the set returned by this method.
-
Constructor Details
-
BalanceRequestImpl
-
BalanceRequestImpl
-
-
Method Details
-
getNodes
Description copied from interface:BalanceRequestReplicas should only be balanced on nodes in the set returned by this method.When Collection API calls do not specify a specific set of nodes, replicas can be balanced on all live nodes in the cluster. In such cases, this set will be equal to the set of all live nodes. The plugin placement code does not need to worry (or care) if a set of nodes was explicitly specified or not.
- Specified by:
getNodesin interfaceBalanceRequest- Returns:
- never
nulland never empty set (if that set was to be empty for any reason, no balance would be possible and the Solr infrastructure driving the plugin code would detect the error itself rather than calling the plugin).
-
getMaximumBalanceSkew
public int getMaximumBalanceSkew()- Specified by:
getMaximumBalanceSkewin interfaceBalanceRequest
-
getCollection
Description copied from interface:ModificationRequestTheSolrCollectionto modify.- Specified by:
getCollectionin interfaceModificationRequest
-