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 PlacementPlan
createPlacementPlan(PlacementRequest request, Set<ReplicaPlacement> replicaPlacements)
Creates aPlacementPlan
for adding replicas to a given shard(s) of an existing collection.ReplicaPlacement
createReplicaPlacement(SolrCollection solrCollection, String shardName, Node node, Replica.ReplicaType replicaType)
Creates aReplicaPlacement
to be passed toPlacementPlan
factory methods.
-
-
-
Method Detail
-
createPlacementPlan
public PlacementPlan createPlacementPlan(PlacementRequest request, Set<ReplicaPlacement> replicaPlacements)
Description copied from interface:PlacementPlanFactory
Creates aPlacementPlan
for 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
,MigrateCmd
as well as ofCreateCollectionCmd
.- Specified by:
createPlacementPlan
in interfacePlacementPlanFactory
-
createReplicaPlacement
public ReplicaPlacement createReplicaPlacement(SolrCollection solrCollection, String shardName, Node node, Replica.ReplicaType replicaType)
Description copied from interface:PlacementPlanFactory
Creates aReplicaPlacement
to be passed toPlacementPlan
factory methods.Note the plugin can also build its own instances implementing
ReplicaPlacement
instead of using this call (but using this method makes it easier).- Specified by:
createReplicaPlacement
in interfacePlacementPlanFactory
-
-