Class PlacementPlanFactoryImpl
java.lang.Object
org.apache.solr.cluster.placement.impl.PlacementPlanFactoryImpl
- All Implemented Interfaces:
PlacementPlanFactory
Simple implementation of
PlacementPlanFactory.-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
PlacementPlanFactoryImpl
public PlacementPlanFactoryImpl()
-
-
Method Details
-
createPlacementPlan
public PlacementPlan createPlacementPlan(PlacementRequest request, Set<ReplicaPlacement> replicaPlacements) Description copied from interface:PlacementPlanFactoryCreates 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.- Specified by:
createPlacementPlanin interfacePlacementPlanFactory
-
createReplicaPlacement
public ReplicaPlacement createReplicaPlacement(SolrCollection solrCollection, String shardName, Node node, Replica.ReplicaType replicaType) Description copied from interface:PlacementPlanFactoryCreates 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).- Specified by:
createReplicaPlacementin interfacePlacementPlanFactory
-