Class PlacementPlanFactoryImpl
- java.lang.Object
-
- org.apache.solr.cluster.placement.impl.PlacementPlanFactoryImpl
-
- All Implemented Interfaces:
PlacementPlanFactory
public class PlacementPlanFactoryImpl extends Object implements PlacementPlanFactory
Simple implementation ofPlacementPlanFactory.
-
-
Constructor Summary
Constructors Constructor Description PlacementPlanFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete 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
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
-
-