Class SolrScraper
- java.lang.Object
-
- org.apache.solr.prometheus.scraper.SolrScraper
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
SolrCloudScraper
,SolrStandaloneScraper
public abstract class SolrScraper extends Object implements Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
BASE_URL_LABEL
protected static String
CLUSTER_ID_LABEL
protected String
clusterId
protected ExecutorService
executor
protected static com.fasterxml.jackson.databind.ObjectMapper
OBJECT_MAPPER
protected static String
ZK_HOST_LABEL
-
Constructor Summary
Constructors Constructor Description SolrScraper(ExecutorService executor, String clusterId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MetricSamples
collections(MetricsQuery metricsQuery)
abstract Map<String,MetricSamples>
metricsForAllHosts(MetricsQuery query)
abstract Map<String,MetricSamples>
pingAllCollections(MetricsQuery query)
abstract Map<String,MetricSamples>
pingAllCores(MetricsQuery query)
protected MetricSamples
request(org.apache.solr.client.solrj.SolrClient client, MetricsQuery query)
abstract MetricSamples
search(MetricsQuery query)
protected Map<String,MetricSamples>
sendRequestsInParallel(Collection<String> items, Function<String,MetricSamples> samplesCallable)
-
-
-
Field Detail
-
ZK_HOST_LABEL
protected static final String ZK_HOST_LABEL
- See Also:
- Constant Field Values
-
BASE_URL_LABEL
protected static final String BASE_URL_LABEL
- See Also:
- Constant Field Values
-
CLUSTER_ID_LABEL
protected static final String CLUSTER_ID_LABEL
- See Also:
- Constant Field Values
-
OBJECT_MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
-
clusterId
protected final String clusterId
-
executor
protected final ExecutorService executor
-
-
Constructor Detail
-
SolrScraper
public SolrScraper(ExecutorService executor, String clusterId)
-
-
Method Detail
-
metricsForAllHosts
public abstract Map<String,MetricSamples> metricsForAllHosts(MetricsQuery query) throws IOException
- Throws:
IOException
-
pingAllCores
public abstract Map<String,MetricSamples> pingAllCores(MetricsQuery query) throws IOException
- Throws:
IOException
-
pingAllCollections
public abstract Map<String,MetricSamples> pingAllCollections(MetricsQuery query) throws IOException
- Throws:
IOException
-
search
public abstract MetricSamples search(MetricsQuery query) throws IOException
- Throws:
IOException
-
collections
public abstract MetricSamples collections(MetricsQuery metricsQuery) throws IOException
- Throws:
IOException
-
sendRequestsInParallel
protected Map<String,MetricSamples> sendRequestsInParallel(Collection<String> items, Function<String,MetricSamples> samplesCallable) throws IOException
- Throws:
IOException
-
request
protected MetricSamples request(org.apache.solr.client.solrj.SolrClient client, MetricsQuery query) throws IOException
- Throws:
IOException
-
-