public class HdfsLocalityReporter extends Object implements SolrInfoBean, SolrMetricProducer
SolrInfoBean.Category, SolrInfoBean.Group
Modifier and Type | Field and Description |
---|---|
static String |
LOCALITY_BLOCKS_LOCAL
Deprecated.
|
static String |
LOCALITY_BLOCKS_RATIO
Deprecated.
|
static String |
LOCALITY_BLOCKS_TOTAL
Deprecated.
|
static String |
LOCALITY_BYTES_LOCAL
Deprecated.
|
static String |
LOCALITY_BYTES_RATIO
Deprecated.
|
static String |
LOCALITY_BYTES_TOTAL
Deprecated.
|
Constructor and Description |
---|
HdfsLocalityReporter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
SolrInfoBean.Category |
getCategory()
Deprecated.
Category of this component
|
String |
getDescription()
Deprecated.
Simple one or two line description
|
Set<String> |
getMetricNames()
Deprecated.
Modifiable set of metric names that this component reports (default is null,
which means none).
|
com.codahale.metrics.MetricRegistry |
getMetricRegistry()
Deprecated.
An instance of
MetricRegistry that this component uses for metrics reporting
(default is null, which means no registry). |
String |
getName()
Deprecated.
Simple common usage name, e.g.
|
SolrMetricsContext |
getSolrMetricsContext()
Deprecated.
Implementing classes should override this method to provide the context obtained in
SolrMetricProducer.initializeMetrics(SolrMetricsContext, String) to ensure proper cleanup of metrics
at the end of the life-cycle of this component. |
void |
initializeMetrics(SolrMetricsContext parentContext,
String scope)
Deprecated.
Provide statistics on HDFS block locality, both in terms of bytes and block counts.
|
void |
registerDirectory(HdfsDirectory dir)
Deprecated.
Add a directory for block locality reporting.
|
void |
setHost(String hostname)
Deprecated.
Set the host name to use when determining locality
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricsSnapshot, registerMetricName
close, getUniqueMetricTag, initializeMetrics
public static final String LOCALITY_BYTES_TOTAL
public static final String LOCALITY_BYTES_LOCAL
public static final String LOCALITY_BYTES_RATIO
public static final String LOCALITY_BLOCKS_TOTAL
public static final String LOCALITY_BLOCKS_LOCAL
public static final String LOCALITY_BLOCKS_RATIO
public void setHost(String hostname)
hostname
- The name of this host; should correspond to what HDFS Data Nodes think this is.public String getName()
SolrInfoBean
getName
in interface SolrInfoBean
public String getDescription()
SolrInfoBean
getDescription
in interface SolrInfoBean
public SolrInfoBean.Category getCategory()
SolrInfoBean
getCategory
in interface SolrInfoBean
public Set<String> getMetricNames()
SolrInfoBean
SolrInfoBean.registerMetricName(String)
to capture what metrics names are reported from this component.
NOTE: this set has to allow iteration under modifications.
getMetricNames
in interface SolrInfoBean
public com.codahale.metrics.MetricRegistry getMetricRegistry()
SolrInfoBean
MetricRegistry
that this component uses for metrics reporting
(default is null, which means no registry).getMetricRegistry
in interface SolrInfoBean
public SolrMetricsContext getSolrMetricsContext()
SolrMetricProducer
SolrMetricProducer.initializeMetrics(SolrMetricsContext, String)
to ensure proper cleanup of metrics
at the end of the life-cycle of this component.getSolrMetricsContext
in interface SolrMetricProducer
public void initializeMetrics(SolrMetricsContext parentContext, String scope)
initializeMetrics
in interface SolrMetricProducer
parentContext
- parent metrics context. If this component has the same life-cycle as the parent
it can simply use the parent context, otherwise it should obtain a child context
using SolrMetricsContext.getChildContext(Object)
passing this
as the child.scope
- component scopepublic void registerDirectory(HdfsDirectory dir)
dir
- The directory to keep metrics on.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.