Package org.apache.solr.cluster.placement
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
-
ClassDescriptionInstances of this interface are used to fetch various attributes from nodes (and other sources) in the cluster.A fully specified plan or instructions for replica balancing to be applied to the cluster.Allows plugins to create
BalancePlans telling the Solr layer how to balance replicas following the processing of aBalanceRequest.A cluster related placement request that Solr asks aPlacementPluginto resolve and compute replica balancing plan for replicas that already exist across a set of Nodes.Collection-level metrics.Delete collection request.Delete replicas request.Delete shards request.Metric<T>Metric-related attribute of a node or replica.Collection modification request.NodeMetric<T>Node metric identifier, corresponding to a node-level metric name with optional labels for metricPlacement context makes it easier to pass around and access main placement-related components.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).Exception thrown when a placement modification is rejected by the placement plugin.A fully specified plan or instructions for placement, deletion or move to be applied to the cluster.Allows plugins to createPlacementPlans telling the Solr layer where to create replicas following the processing of aPlacementRequest.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).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.Useful type for plugins that don't use any configuration.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.Replica metric identifier, corresponding to one of the internal replica-level metric names (as reported insolr.core.[collection].[replica]registry)Strongly-typed replica-level metrics.Placement decision for a singleReplica.Shard-level metrics.