public class HdfsLocalityReporter extends Object implements SolrInfoMBean, SolrMetricProducer
SolrInfoMBean.Category, SolrInfoMBean.Group
Modifier and Type | Field and Description |
---|---|
static String |
LOCALITY_BLOCKS_LOCAL |
static String |
LOCALITY_BLOCKS_RATIO |
static String |
LOCALITY_BLOCKS_TOTAL |
static String |
LOCALITY_BYTES_LOCAL |
static String |
LOCALITY_BYTES_RATIO |
static String |
LOCALITY_BYTES_TOTAL |
Constructor and Description |
---|
HdfsLocalityReporter() |
Modifier and Type | Method and Description |
---|---|
SolrInfoMBean.Category |
getCategory()
Purpose of this Class
|
String |
getDescription()
Simple one or two line description
|
URL[] |
getDocs()
Documentation URL list.
|
String |
getName()
Simple common usage name, e.g.
|
String |
getSource()
CVS Source, SVN Source, etc
|
NamedList |
getStatistics()
Provide statistics on HDFS block locality, both in terms of bytes and block counts.
|
String |
getVersion()
Simple common usage version, e.g.
|
void |
initializeMetrics(SolrMetricManager manager,
String registry,
String scope)
Initializes metrics specific to this producer
|
void |
registerDirectory(HdfsDirectory dir)
Add a directory for block locality reporting.
|
void |
setHost(String hostname)
Set the host name to use when determining locality
|
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()
SolrInfoMBean
getName
in interface SolrInfoMBean
public String getVersion()
SolrInfoMBean
getVersion
in interface SolrInfoMBean
public String getDescription()
SolrInfoMBean
getDescription
in interface SolrInfoMBean
public SolrInfoMBean.Category getCategory()
SolrInfoMBean
getCategory
in interface SolrInfoMBean
public String getSource()
SolrInfoMBean
getSource
in interface SolrInfoMBean
public URL[] getDocs()
SolrInfoMBean
Suggested documentation URLs: Homepage for sponsoring project, FAQ on class usage, Design doc for class, Wiki, bug reporting URL, etc...
getDocs
in interface SolrInfoMBean
public NamedList getStatistics()
getStatistics
in interface SolrInfoMBean
public void initializeMetrics(SolrMetricManager manager, String registry, String scope)
SolrMetricProducer
initializeMetrics
in interface SolrMetricProducer
manager
- an instance of SolrMetricManager
registry
- registry name where metrics are registeredscope
- scope of the metrics (eg. handler name) to separate metrics of
instances of the same component executing in different contextspublic void registerDirectory(HdfsDirectory dir)
dir
- The directory to keep metrics on.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.