public class SolrCoreMetricManager extends Object implements Closeable
SolrMetricProducer
's
and exposing metrics to SolrMetricReporter
's.Constructor and Description |
---|
SolrCoreMetricManager(SolrCore core)
Constructs a metric manager.
|
Modifier and Type | Method and Description |
---|---|
void |
afterCoreSetName()
Make sure that metrics already collected that correspond to the old core name
are carried over and will be used under the new core name.
|
void |
close()
Closes reporters specific to this core.
|
static String |
createRegistryName(String collectionName,
String coreName) |
SolrCore |
getCore() |
String |
getRegistryName()
Retrieves the metric registry name of the manager.
|
void |
loadReporters()
Load reporters configured globally and specific to
SolrInfoMBean.Group.core
group or with a registry name specific to this core. |
void |
registerMetricProducer(String scope,
SolrMetricProducer producer)
Registers a mapping of name/metric's with the manager's metric registry.
|
public SolrCoreMetricManager(SolrCore core)
core
- the metric manager's corepublic void loadReporters()
SolrInfoMBean.Group.core
group or with a registry name specific to this core.public void afterCoreSetName()
public void registerMetricProducer(String scope, SolrMetricProducer producer)
scope
- the scope of the metrics to be registered (e.g. `/admin/ping`)producer
- producer of metrics to be registeredpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public SolrCore getCore()
public String getRegistryName()
For example, when the core name looks like this but it's NOT a SolrCloud collection:
my_collection_shard1_1_replica1
then this will be used as the registry name (plus
the required solr.core
prefix). However,
if this is a SolrCloud collection my_collection
then the registry name will become
solr.core.my_collection.shard1_1.replica1
.
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.