Class AttributeFetcherImpl
java.lang.Object
org.apache.solr.cluster.placement.impl.AttributeFetcherImpl
- All Implemented Interfaces:
AttributeFetcher
Implementation of
AttributeFetcher that uses SolrCloudManager to access Solr
cluster details.-
Method Summary
Modifier and TypeMethodDescriptionFetches all requested node attributes from all nodes passed toAttributeFetcher.fetchFrom(Set)as well as non-node attributes (those requested using e.g.The set of nodes from which to fetch all node related attributes.static StringrequestCollectionMetrics(SolrCollection solrCollection, Set<ReplicaMetric<?>> metrics) Request collection-level metrics.requestNodeMetric(NodeMetric<?> metric) Request a node metric from each node.Request a given system property on each node.
-
Method Details
-
requestNodeSystemProperty
Description copied from interface:AttributeFetcherRequest a given system property on each node. To get the value useAttributeValues.getSystemProperty(Node, String)- Specified by:
requestNodeSystemPropertyin interfaceAttributeFetcher- Parameters:
name- system property name
-
requestNodeMetric
Description copied from interface:AttributeFetcherRequest a node metric from each node. To get the value useAttributeValues.getNodeMetric(Node, NodeMetric)- Specified by:
requestNodeMetricin interfaceAttributeFetcher- Parameters:
metric- metric to retrieve (seeNodeMetric)
-
requestCollectionMetrics
public AttributeFetcher requestCollectionMetrics(SolrCollection solrCollection, Set<ReplicaMetric<?>> metrics) Description copied from interface:AttributeFetcherRequest collection-level metrics. To get the values useAttributeValues.getCollectionMetrics(String). Note that this request will fetch information from nodes that are relevant to the collection replicas and not the ones specified inAttributeFetcher.fetchFrom(Set)(though they may overlap).- Specified by:
requestCollectionMetricsin interfaceAttributeFetcher- Parameters:
solrCollection- request metrics for this collectionmetrics- metrics to retrieve (seeReplicaMetric)
-
fetchFrom
Description copied from interface:AttributeFetcherThe set of nodes from which to fetch all node related attributes. Calling this method is mandatory if any of therequestNode*methods got called.- Specified by:
fetchFromin interfaceAttributeFetcher- Parameters:
nodes- nodes to fetch from
-
fetchAttributes
Description copied from interface:AttributeFetcherFetches all requested node attributes from all nodes passed toAttributeFetcher.fetchFrom(Set)as well as non-node attributes (those requested using e.g.AttributeFetcher.requestCollectionMetrics(SolrCollection, Set).- Specified by:
fetchAttributesin interfaceAttributeFetcher- Returns:
- An instance allowing retrieval of all attributes that could be fetched.
-
getSystemPropertySnitchTag
-