org.apache.hadoop.dfs
Class NameNodeMetrics

java.lang.Object
  extended by org.apache.hadoop.dfs.NameNodeMetrics
All Implemented Interfaces:
Updater

public class NameNodeMetrics
extends Object
implements Updater

This class is for maintaining the various NameNode statistics and publishing them through the metrics interfaces. This also registers the JMX MBean for RPC.

This class has a number of metrics variables that are publicly accessible; these variables (objects) have methods to update their values; for example:

syncs.inc()


Field Summary
 MetricsTimeVaryingRate blockReport
           
 MetricsIntValue fsImageLoadTime
           
 MetricsTimeVaryingInt numAddBlockOps
           
 MetricsIntValue numBlocksCorrupted
           
 MetricsTimeVaryingInt numCreateFileOps
           
 MetricsTimeVaryingInt numDeleteFileOps
           
 MetricsTimeVaryingInt numFilesCreated
           
 MetricsTimeVaryingInt numFilesRenamed
           
 MetricsTimeVaryingInt numGetBlockLocations
           
 MetricsTimeVaryingInt numGetListingOps
           
 MetricsIntValue safeModeTime
           
 MetricsTimeVaryingRate syncs
           
 MetricsTimeVaryingRate transactions
           
 
Method Summary
 void doUpdates(MetricsContext unused)
          Since this object is a registered updater, this method will be called periodically, e.g.
 void resetAllMinMax()
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numFilesCreated

public MetricsTimeVaryingInt numFilesCreated

numGetBlockLocations

public MetricsTimeVaryingInt numGetBlockLocations

numFilesRenamed

public MetricsTimeVaryingInt numFilesRenamed

numGetListingOps

public MetricsTimeVaryingInt numGetListingOps

numCreateFileOps

public MetricsTimeVaryingInt numCreateFileOps

numDeleteFileOps

public MetricsTimeVaryingInt numDeleteFileOps

numAddBlockOps

public MetricsTimeVaryingInt numAddBlockOps

transactions

public MetricsTimeVaryingRate transactions

syncs

public MetricsTimeVaryingRate syncs

blockReport

public MetricsTimeVaryingRate blockReport

safeModeTime

public MetricsIntValue safeModeTime

fsImageLoadTime

public MetricsIntValue fsImageLoadTime

numBlocksCorrupted

public MetricsIntValue numBlocksCorrupted
Method Detail

shutdown

public void shutdown()

doUpdates

public void doUpdates(MetricsContext unused)
Since this object is a registered updater, this method will be called periodically, e.g. every 5 seconds.

Specified by:
doUpdates in interface Updater

resetAllMinMax

public void resetAllMinMax()


Copyright © 2008 The Apache Software Foundation