public class Log4JMetricsContext extends AbstractMetricsContext
Modifier and Type | Field and Description |
---|---|
protected String |
host |
protected static String |
HOST_PROPERTY |
protected int |
period |
protected static String |
PERIOD_PROPERTY |
protected int |
port |
protected static String |
PORT_PROPERTY |
Constructor and Description |
---|
Log4JMetricsContext()
Creates a new instance of MetricsContext
|
Modifier and Type | Method and Description |
---|---|
protected void |
emitRecord(String contextName,
String recordName,
org.apache.hadoop.metrics.spi.OutputRecord outRec)
Sends a record to the metrics system.
|
Map<String,Collection<org.apache.hadoop.metrics.spi.OutputRecord>> |
getAllRecords() |
void |
init(String contextName,
org.apache.hadoop.metrics.ContextFactory factory)
Initializes the context.
|
close, createRecord, flush, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, isMonitoring, newRecord, registerUpdater, remove, setPeriod, startMonitoring, stopMonitoring, unregisterUpdater, update
protected static final String PERIOD_PROPERTY
protected static final String HOST_PROPERTY
protected static final String PORT_PROPERTY
protected int period
protected String host
protected int port
public Log4JMetricsContext()
public void init(String contextName, org.apache.hadoop.metrics.ContextFactory factory)
AbstractMetricsContext
init
in interface org.apache.hadoop.metrics.MetricsContext
init
in class AbstractMetricsContext
protected void emitRecord(String contextName, String recordName, org.apache.hadoop.metrics.spi.OutputRecord outRec) throws IOException
AbstractMetricsContext
emitRecord
in class AbstractMetricsContext
IOException
public Map<String,Collection<org.apache.hadoop.metrics.spi.OutputRecord>> getAllRecords()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.