Interface PlacementPlanFactory
-
- All Known Implementing Classes:
PlacementPlanFactoryImpl
public interface PlacementPlanFactoryAllows plugins to createPlacementPlans telling the Solr layer where to create replicas following the processing of aPlacementRequest. The Solr layer can (and will) check that thePlacementPlanconforms to thePlacementRequest(and if it does not, the requested operation will fail).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PlacementPlancreatePlacementPlan(PlacementRequest request, Set<ReplicaPlacement> replicaPlacements)Creates aPlacementPlanfor adding replicas to a given shard(s) of an existing collection.ReplicaPlacementcreateReplicaPlacement(SolrCollection solrCollection, String shardName, Node node, Replica.ReplicaType replicaType)Creates aReplicaPlacementto be passed toPlacementPlanfactory methods.
-
-
-
Method Detail
-
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).
-
-