Interface PlacementPlanFactory
- All Known Implementing Classes:
PlacementPlanFactoryImpl
public interface PlacementPlanFactory
Allows plugins to create
PlacementPlans telling the Solr layer where to create replicas
following the processing of a PlacementRequest. The Solr layer can (and will) check that
the PlacementPlan conforms to the PlacementRequest (and if it does not, the
requested operation will fail).-
Method Summary
Modifier and TypeMethodDescriptioncreatePlacementPlan(PlacementRequest request, Set<ReplicaPlacement> replicaPlacements) Creates aPlacementPlanfor adding replicas to a given shard(s) of an existing collection.createReplicaPlacement(SolrCollection solrCollection, String shardName, Node node, Replica.ReplicaType replicaType) Creates aReplicaPlacementto be passed toPlacementPlanfactory methods.
-
Method Details
-
createPlacementPlan
PlacementPlan createPlacementPlan(PlacementRequest request, Set<ReplicaPlacement> replicaPlacements) Creates aPlacementPlanfor adding replicas to a given shard(s) of an existing collection. Note this is also used for creating new collections since such a creation first creates the collection, then adds the replicas.This is in support (directly or indirectly) of
AddReplicaCmd,CreateShardCmd,ReplaceNodeCmd,MoveReplicaCmd,MigrateReplicasCmd,SplitShardCmd,RestoreCmd,MigrateCmdas well as ofCreateCollectionCmd. -
createReplicaPlacement
ReplicaPlacement createReplicaPlacement(SolrCollection solrCollection, String shardName, Node node, Replica.ReplicaType replicaType) Creates aReplicaPlacementto be passed toPlacementPlanfactory methods.Note the plugin can also build its own instances implementing
ReplicaPlacementinstead of using this call (but using this method makes it easier).
-