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()
SolrInfoMBeangetName in interface SolrInfoMBeanpublic String getVersion()
SolrInfoMBeangetVersion in interface SolrInfoMBeanpublic String getDescription()
SolrInfoMBeangetDescription in interface SolrInfoMBeanpublic SolrInfoMBean.Category getCategory()
SolrInfoMBeangetCategory in interface SolrInfoMBeanpublic String getSource()
SolrInfoMBeangetSource in interface SolrInfoMBeanpublic URL[] getDocs()
SolrInfoMBeanSuggested documentation URLs: Homepage for sponsoring project, FAQ on class usage, Design doc for class, Wiki, bug reporting URL, etc...
getDocs in interface SolrInfoMBeanpublic NamedList getStatistics()
getStatistics in interface SolrInfoMBeanpublic void initializeMetrics(SolrMetricManager manager, String registry, String scope)
SolrMetricProducerinitializeMetrics in interface SolrMetricProducermanager - an instance of SolrMetricManagerregistry - 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.