org.apache.hadoop.dfs
Class FSNamesystemMetrics
java.lang.Object
org.apache.hadoop.dfs.FSNamesystemMetrics
- All Implemented Interfaces:
- Updater
public class FSNamesystemMetrics
- extends Object
- implements Updater
This class is for maintaining the various FSNamesystem status metrics
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:
filesTotal
.set()
Method Summary |
void |
doUpdates(MetricsContext unused)
Since this object is a registered updater, this method will be called
periodically, e.g. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
filesTotal
public MetricsIntValue filesTotal
blocksTotal
public MetricsIntValue blocksTotal
capacityTotalGB
public MetricsIntValue capacityTotalGB
capacityUsedGB
public MetricsIntValue capacityUsedGB
capacityRemainingGB
public MetricsIntValue capacityRemainingGB
totalLoad
public MetricsIntValue totalLoad
pendingReplicationBlocks
public MetricsIntValue pendingReplicationBlocks
underReplicatedBlocks
public MetricsIntValue underReplicatedBlocks
scheduledReplicationBlocks
public MetricsIntValue scheduledReplicationBlocks
doUpdates
public void doUpdates(MetricsContext unused)
- Since this object is a registered updater, this method will be called
periodically, e.g. every 5 seconds.
We set the metrics value within this function before pushing it out.
FSNamesystem updates its own local variables which are
light weight compared to Metrics counters.
Some of the metrics are explicity casted to int. Few metrics collectors
do not handle long values. It is safe to cast to int for now as all these
values fit in int value.
Metrics related to DFS capacity are stored in bytes which do not fit in
int, so they are rounded to GB
- Specified by:
doUpdates
in interface Updater
Copyright © 2008 The Apache Software Foundation