Package org.apache.solr.cluster.placement
This package contains interfaces visible by plugins (i.e. contributed code) implementing cluster
elasticity, placement and scalability, as well as a few examples on how plugins can be
implemented.
Initially, only placement related plugins are supported.
The entry point is the PlacementPluginFactory
building instances of the PlacementPlugin
interface
where the placement computation is implemented.
From there, one will access the interfaces that allow navigating the cluster topology, see
org.apache.solr.cluster
.
Plugin code:
- Gets work to be done by receiving a
PlacementRequest
, - Can obtain more info using
AttributeFetcher
and building anAttributeValues
- Uses the values from
AttributeValues
as well as cluster state andSolrCollection.getCustomProperty(java.lang.String)
and other data to compute placement, - Placement decisions are returned to Solr using an instance of
PlacementPlan
built using thePlacementPlanFactory
-
Interface Summary Interface Description AttributeFetcher Instances of this interface are used to fetch various attributes from nodes (and other sources) in the cluster.AttributeValues BalancePlan A fully specified plan or instructions for replica balancing to be applied to the cluster.BalancePlanFactory Allows plugins to createBalancePlan
s telling the Solr layer how to balance replicas following the processing of aBalanceRequest
.BalanceRequest A cluster related placement request that Solr asks aPlacementPlugin
to resolve and compute replica balancing plan for replicas that already exist across a set of Nodes.CollectionMetrics Collection-level metrics.DeleteCollectionRequest Delete collection request.DeleteReplicasRequest Delete replicas request.DeleteShardsRequest Delete shards request.Metric<T> Metric-related attribute of a node or replica.ModificationRequest Collection modification request.NodeMetric<T> Node metric identifier, corresponding to a node-level metric registry and the internal metric name.PlacementContext Placement context makes it easier to pass around and access main placement-related components.PlacementPlan A fully specified plan or instructions for placement, deletion or move to be applied to the cluster.PlacementPlanFactory Allows plugins to createPlacementPlan
s telling the Solr layer where to create replicas following the processing of aPlacementRequest
.PlacementPlugin Implemented by external plugins to control replica placement and movement on the search cluster (as well as other things such as cluster elasticity?) when cluster changes are required (initiated elsewhere, most likely following a Collection API call).PlacementPluginConfig Configuration beans should use this interface to define public (mutable) configuration properties.PlacementPluginFactory<T extends PlacementPluginConfig> Factory implemented by client code and configured in container plugins (seeContainerPluginsApi.editAPI
) allowing the creation of instances ofPlacementPlugin
to be used for replica placement computation.PlacementRequest A cluster related placement request that Solr asks aPlacementPlugin
plugin to resolve and compute aPlacementPlan
placing one or moreReplica
's of one or moreShard
's of an existingSolrCollection
.ReplicaMetric<T> Replica metric identifier, corresponding to one of the internal replica-level metric names (as reported insolr.core.[collection].[replica]
registry)ReplicaMetrics Strongly-typed replica-level metrics.ReplicaPlacement Placement decision for a singleReplica
.ShardMetrics Shard-level metrics. -
Class Summary Class Description PlacementPluginFactory.NoConfig Useful type for plugins that don't use any configuration. -
Enum Summary Enum Description NodeMetric.Registry Registry options for node metrics. -
Exception Summary Exception Description PlacementException Exception thrown by aPlacementPlugin
when it is unable to compute placement for whatever reason (except anInterruptedException
thatPlacementPlugin.computePlacement(org.apache.solr.cluster.placement.PlacementRequest, org.apache.solr.cluster.placement.PlacementContext)
is also allowed to throw).PlacementModificationException Exception thrown when a placement modification is rejected by the placement plugin.