public static class SolrReporter.Builder extends Object
Modifier and Type | Method and Description |
---|---|
SolrReporter |
build(org.apache.http.client.HttpClient client,
Supplier<String> urlProvider)
Build it.
|
SolrReporter.Builder |
cloudClient(boolean cloudClient)
If true then use
CloudSolrClient for communication. |
SolrReporter.Builder |
convertDurationsTo(TimeUnit durationUnit)
Convert durations to the given time unit.
|
SolrReporter.Builder |
convertRatesTo(TimeUnit rateUnit)
Convert rates to the given time unit.
|
static SolrReporter.Builder |
forReports(SolrMetricManager metricManager,
List<SolrReporter.Report> reports)
Create a builder for SolrReporter.
|
SolrReporter.Builder |
setCompact(boolean compact)
If true then use "compact" data representation.
|
SolrReporter.Builder |
skipAggregateValues(boolean skipAggregateValues)
Individual values from
AggregateMetric may not be worth to report. |
SolrReporter.Builder |
skipHistograms(boolean skipHistograms)
Histograms are difficult / impossible to aggregate, so it may not be
worth to report them.
|
SolrReporter.Builder |
withHandler(String handler)
Handler name to use at the remote end.
|
SolrReporter.Builder |
withReporterId(String reporterId)
Use this id to identify metrics from this instance.
|
SolrReporter.Builder |
withSolrParams(SolrParams params)
Additional
SolrParams to add to every request. |
public static SolrReporter.Builder forReports(SolrMetricManager metricManager, List<SolrReporter.Report> reports)
metricManager
- metric manager that is the source of metricsreports
- report definitionspublic SolrReporter.Builder withSolrParams(SolrParams params)
SolrParams
to add to every request.params
- additional paramsthis
public SolrReporter.Builder cloudClient(boolean cloudClient)
CloudSolrClient
for communication.
Default is false.cloudClient
- use CloudSolrClient when true, HttpSolrClient
otherwise.this
public SolrReporter.Builder setCompact(boolean compact)
compact
- compact representation.this
public SolrReporter.Builder skipHistograms(boolean skipHistograms)
skipHistograms
- when true then skip histograms from reportsthis
public SolrReporter.Builder skipAggregateValues(boolean skipAggregateValues)
AggregateMetric
may not be worth to report.skipAggregateValues
- when tru then skip reporting individual values from the metricthis
public SolrReporter.Builder withHandler(String handler)
handler
- handler name, eg. "/admin/metricsCollector"this
public SolrReporter.Builder withReporterId(String reporterId)
reporterId
- reporter idthis
public SolrReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit
- a unit of timethis
public SolrReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit
- a unit of timethis
public SolrReporter build(org.apache.http.client.HttpClient client, Supplier<String> urlProvider)
client
- an instance of HttpClient
to be used for making calls.urlProvider
- function that returns the base URL of Solr instance to target. May return
null to indicate that reporting should be skipped. Note: this
function will be called every time just before report is sent.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.