Class AttributeFetcherImpl
- java.lang.Object
-
- org.apache.solr.cluster.placement.impl.AttributeFetcherImpl
-
- All Implemented Interfaces:
AttributeFetcher
public class AttributeFetcherImpl extends Object implements AttributeFetcher
Implementation ofAttributeFetcherthat usesSolrCloudManagerto access Solr cluster details.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeValuesfetchAttributes()Fetches all requested node attributes from all nodes passed toAttributeFetcher.fetchFrom(Set)as well as non-node attributes (those requested using e.g.AttributeFetcherfetchFrom(Set<Node> nodes)The set of nodes from which to fetch all node related attributes.static StringgetMetricTag(NodeMetric<?> metric)static StringgetSystemPropertySnitchTag(String name)AttributeFetcherrequestCollectionMetrics(SolrCollection solrCollection, Set<ReplicaMetric<?>> metrics)Request collection-level metrics.AttributeFetcherrequestNodeMetric(NodeMetric<?> metric)Request a node metric from each node.AttributeFetcherrequestNodeSystemProperty(String name)Request a given system property on each node.
-
-
-
Method Detail
-
requestNodeSystemProperty
public AttributeFetcher requestNodeSystemProperty(String name)
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
public AttributeFetcher requestNodeMetric(NodeMetric<?> metric)
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
public AttributeFetcher fetchFrom(Set<Node> nodes)
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
public AttributeValues 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.
-
getMetricTag
public static String getMetricTag(NodeMetric<?> metric)
-
-