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
AttributeFetcherand building anAttributeValues - Uses the values from
AttributeValuesas 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
PlacementPlanbuilt 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 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 createPlacementPlans 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 ofPlacementPluginto be used for replica placement computation.PlacementRequest A cluster related placement request that Solr asks aPlacementPluginplugin to resolve and compute aPlacementPlanplacing 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 aPlacementPluginwhen it is unable to compute placement for whatever reason (except anInterruptedExceptionthatPlacementPlugin.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.