org.apache.hadoop.chukwa.inputtools.log4j
Class Log4JMetricsContext
java.lang.Object
org.apache.hadoop.metrics.spi.AbstractMetricsContext
org.apache.hadoop.chukwa.inputtools.log4j.Log4JMetricsContext
- All Implemented Interfaces:
- org.apache.hadoop.metrics.MetricsContext
public class Log4JMetricsContext
- extends AbstractMetricsContext
Fields inherited from interface org.apache.hadoop.metrics.MetricsContext |
DEFAULT_PERIOD |
Method Summary |
protected void |
emitRecord(String contextName,
String recordName,
org.apache.hadoop.metrics.spi.OutputRecord outRec)
Sends a record to the metrics system. |
void |
init(String contextName,
org.apache.hadoop.metrics.ContextFactory factory)
Initializes the context. |
Methods inherited from class org.apache.hadoop.metrics.spi.AbstractMetricsContext |
close, createRecord, flush, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, isMonitoring, newRecord, registerUpdater, remove, setPeriod, startMonitoring, stopMonitoring, unregisterUpdater, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OUTPUT_DIR_PROPERTY
protected static final String OUTPUT_DIR_PROPERTY
- See Also:
- Constant Field Values
PERIOD_PROPERTY
protected static final String PERIOD_PROPERTY
- See Also:
- Constant Field Values
ADD_UUID_PROPERTY
protected static final String ADD_UUID_PROPERTY
- See Also:
- Constant Field Values
user
protected static final String user
outputDir
protected String outputDir
period
protected int period
needUUID
protected boolean needUUID
Log4JMetricsContext
public Log4JMetricsContext()
- Creates a new instance of FileContext
init
public void init(String contextName,
org.apache.hadoop.metrics.ContextFactory factory)
- Description copied from class:
AbstractMetricsContext
- Initializes the context.
- Specified by:
init
in interface org.apache.hadoop.metrics.MetricsContext
- Overrides:
init
in class AbstractMetricsContext
emitRecord
protected void emitRecord(String contextName,
String recordName,
org.apache.hadoop.metrics.spi.OutputRecord outRec)
throws IOException
- Description copied from class:
AbstractMetricsContext
- Sends a record to the metrics system.
- Specified by:
emitRecord
in class AbstractMetricsContext
- Throws:
IOException
Copyright © ${year} The Apache Software Foundation