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 numFilesCreated
           
 MetricsTimeVaryingInt numFilesListed
           
 MetricsTimeVaryingInt numFilesRenamed
           
 MetricsTimeVaryingInt numGetBlockLocations
           
 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

numFilesListed

public MetricsTimeVaryingInt numFilesListed

transactions

public MetricsTimeVaryingRate transactions

syncs

public MetricsTimeVaryingRate syncs

blockReport

public MetricsTimeVaryingRate blockReport

safeModeTime

public MetricsIntValue safeModeTime

fsImageLoadTime

public MetricsIntValue fsImageLoadTime
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 © 2006 The Apache Software Foundation