NoEmitMetricsContext (Hadoop 0.20.2-cdh3u5 API)
Date: 2012-10-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.metrics.spi
Class NoEmitMetricsContext

    java.lang.Object
      org.apache.hadoop.metrics.spi.AbstractMetricsContext
          org.apache.hadoop.metrics.spi.NoEmitMetricsContext

All Implemented Interfaces:
  MetricsContext

    public class NoEmitMetricsContext

extends AbstractMetricsContext

A MetricsContext that does not emit data, but, unlike NullContextWithUpdate, does save it for retrieval with getAllRecords(). This is useful if you want to support `MetricsServlet`, but not emit metrics in any other way.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.metrics.spi.AbstractMetricsContext
`AbstractMetricsContext.MetricMap, AbstractMetricsContext.TagMap`

Field Summary

Fields inherited from interface org.apache.hadoop.metrics.MetricsContext
`DEFAULT_PERIOD`

Constructor Summary
`NoEmitMetricsContext()` Creates a new instance of NullContextWithUpdateThread

Method Summary
`protected void` | `emitRecord(String contextName, String recordName, OutputRecord outRec)` Do-nothing version of emitRecord
`void` | `init(String contextName, ContextFactory factory)` Initializes the context.

Methods inherited from class org.apache.hadoop.metrics.spi.AbstractMetricsContext
`close, createRecord, flush, getAllRecords, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, isMonitoring, newRecord, parseAndSetPeriod, 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`

Constructor Detail

### NoEmitMetricsContext

    public NoEmitMetricsContext()

  Creates a new instance of NullContextWithUpdateThread

Method Detail

### init

    public void init(String contextName,
                     ContextFactory factory)

  Description copied from class: `AbstractMetricsContext`
  Initializes the context.

  Specified by:
    `init` in interface `MetricsContext`
  Overrides:
    `init` in class `AbstractMetricsContext`
  Parameters:
    `contextName` - The given name for this context
    `factory` - The creator of this context

### emitRecord

    protected void emitRecord(String contextName,
                              String recordName,
                              OutputRecord outRec)

  Do-nothing version of emitRecord

  Specified by:
    `emitRecord` in class `AbstractMetricsContext`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation