org.apache.hadoop.metrics.spi
Class CompositeContext

java.lang.Object
  extended by org.apache.hadoop.metrics.spi.AbstractMetricsContext
      extended by org.apache.hadoop.metrics.spi.CompositeContext
All Implemented Interfaces:
MetricsContext

Deprecated. in favor of org.apache.hadoop.metrics2 usage.

@Deprecated
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class CompositeContext
extends AbstractMetricsContext


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
CompositeContext()
          Deprecated.  
 
Method Summary
 void close()
          Deprecated. Stops monitoring and frees buffered data, returning this object to its initial state.
protected  void emitRecord(String contextName, String recordName, OutputRecord outRec)
          Deprecated. Sends a record to the metrics system.
protected  void flush()
          Deprecated. Called each period after all records have been emitted, this method does nothing.
 void init(String contextName, ContextFactory factory)
          Deprecated. Initializes the context.
 boolean isMonitoring()
          Deprecated. Return true if all subcontexts are monitoring.
 MetricsRecord newRecord(String recordName)
          Deprecated. Subclasses should override this if they subclass MetricsRecordImpl.
 void registerUpdater(Updater updater)
          Deprecated. Registers a callback to be called at time intervals determined by the configuration.
 void startMonitoring()
          Deprecated. Starts or restarts monitoring, the emitting of metrics records.
 void stopMonitoring()
          Deprecated. Stops monitoring.
 void unregisterUpdater(Updater updater)
          Deprecated. Removes a callback, if it exists.
 
Methods inherited from class org.apache.hadoop.metrics.spi.AbstractMetricsContext
createRecord, getAllRecords, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, parseAndSetPeriod, remove, setPeriod, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeContext

@InterfaceAudience.Private
public CompositeContext()
Deprecated. 
Method Detail

init

@InterfaceAudience.Private
public void init(String contextName,
                                           ContextFactory factory)
Deprecated. 
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

newRecord

@InterfaceAudience.Private
public MetricsRecord newRecord(String recordName)
Deprecated. 
Description copied from class: AbstractMetricsContext
Subclasses should override this if they subclass MetricsRecordImpl.

Overrides:
newRecord in class AbstractMetricsContext
Parameters:
recordName - the name of the record
Returns:
newly created instance of MetricsRecordImpl or subclass

emitRecord

@InterfaceAudience.Private
protected void emitRecord(String contextName,
                                                    String recordName,
                                                    OutputRecord outRec)
                   throws IOException
Deprecated. 
Description copied from class: AbstractMetricsContext
Sends a record to the metrics system.

Specified by:
emitRecord in class AbstractMetricsContext
Throws:
IOException

flush

@InterfaceAudience.Private
protected void flush()
              throws IOException
Deprecated. 
Description copied from class: AbstractMetricsContext
Called each period after all records have been emitted, this method does nothing. Subclasses may override it in order to perform some kind of flush.

Overrides:
flush in class AbstractMetricsContext
Throws:
IOException

startMonitoring

@InterfaceAudience.Private
public void startMonitoring()
                     throws IOException
Deprecated. 
Description copied from class: AbstractMetricsContext
Starts or restarts monitoring, the emitting of metrics records.

Specified by:
startMonitoring in interface MetricsContext
Overrides:
startMonitoring in class AbstractMetricsContext
Throws:
IOException

stopMonitoring

@InterfaceAudience.Private
public void stopMonitoring()
Deprecated. 
Description copied from class: AbstractMetricsContext
Stops monitoring. This does not free buffered data.

Specified by:
stopMonitoring in interface MetricsContext
Overrides:
stopMonitoring in class AbstractMetricsContext
See Also:
AbstractMetricsContext.close()

isMonitoring

@InterfaceAudience.Private
public boolean isMonitoring()
Deprecated. 
Return true if all subcontexts are monitoring.

Specified by:
isMonitoring in interface MetricsContext
Overrides:
isMonitoring in class AbstractMetricsContext

close

@InterfaceAudience.Private
public void close()
Deprecated. 
Description copied from class: AbstractMetricsContext
Stops monitoring and frees buffered data, returning this object to its initial state.

Specified by:
close in interface MetricsContext
Overrides:
close in class AbstractMetricsContext

registerUpdater

@InterfaceAudience.Private
public void registerUpdater(Updater updater)
Deprecated. 
Description copied from class: AbstractMetricsContext
Registers a callback to be called at time intervals determined by the configuration.

Specified by:
registerUpdater in interface MetricsContext
Overrides:
registerUpdater in class AbstractMetricsContext
Parameters:
updater - object to be run periodically; it should update some metrics records

unregisterUpdater

@InterfaceAudience.Private
public void unregisterUpdater(Updater updater)
Deprecated. 
Description copied from class: AbstractMetricsContext
Removes a callback, if it exists.

Specified by:
unregisterUpdater in interface MetricsContext
Overrides:
unregisterUpdater in class AbstractMetricsContext
Parameters:
updater - object to be removed from the callback list


Copyright © 2009 The Apache Software Foundation