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 ExecutorService
executor
protected static com.fasterxml.jackson.databind.ObjectMapper
OBJECT_MAPPER
-
Constructor Summary
Constructors Constructor Description SolrScraper(ExecutorService executor)
-
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(SolrClient client, MetricsQuery query)
abstract MetricSamples
search(MetricsQuery query)
protected Map<String,MetricSamples>
sendRequestsInParallel(Collection<String> items, Function<String,MetricSamples> samplesCallable)
-
-
-
Field Detail
-
OBJECT_MAPPER
protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
-
executor
protected final ExecutorService executor
-
-
Constructor Detail
-
SolrScraper
public SolrScraper(ExecutorService executor)
-
-
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(SolrClient client, MetricsQuery query) throws IOException
- Throws:
IOException
-
-