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, updateprotected 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)
AbstractMetricsContextinit in interface org.apache.hadoop.metrics.MetricsContextinit in class AbstractMetricsContextprotected void emitRecord(String contextName, String recordName, org.apache.hadoop.metrics.spi.OutputRecord outRec) throws IOException
AbstractMetricsContextemitRecord in class AbstractMetricsContextIOExceptionpublic Map<String,Collection<org.apache.hadoop.metrics.spi.OutputRecord>> getAllRecords()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.