org.apache.hadoop.dfs.namenode.metrics
Interface NameNodeStatisticsMBean

All Known Implementing Classes:
NameNodeStatistics

public interface NameNodeStatisticsMBean

This is the JMX management interface for getting runtime statistics of the name node. Many of the statistics are sampled and averaged on an interval which can be specified in the config file.

For the statistics that are sampled and averaged, one must specify a metrics context that does periodic update calls. Most do. The default Null metrics context however does NOT. So if you aren't using any other metrics context then you can turn on the viewing and averaging of sampled metrics by specifying the following two lines in the hadoop-meterics.properties file:

        dfs.class=org.apache.hadoop.metrics.spi.NullContextWithUpdateThread
        dfs.period=10
  

Note that the metrics are collected regardless of the context used. The context with the update thread is used to average the data periodically.

Name Node Status info is report in another MBean

See Also:
FSNamesystemMBean

Method Summary
 long getBlockReportAverageTime()
          Average time for Block Report Processing in last interval
 long getBlockReportMaxTime()
          The Maximum Block Report Processing Time since reset was called
 long getBlockReportMinTime()
          The Minimum Block Report Processing Time since reset was called
 int getBlockReportNum()
          Number of block Reports processed in the last interval
 int getFSImageLoadTime()
          Time spent loading the FS Image at startup
 long getJournalSyncAverageTime()
          Average time for Journal Sync in last interval
 long getJournalSyncMaxTime()
          The Maximum Journal Sync Time since reset was called
 long getJournalSyncMinTime()
          The Minimum Journal Sync Time since reset was called
 int getJournalSyncNum()
          Number of Journal Syncs in the last interval
 long getJournalTransactionAverageTime()
          Average time for Journal transactions in last interval
 long getJournalTransactionMaxTime()
          The Maximum Journal Transaction Time since reset was called
 long getJournalTransactionMinTime()
          The Minimum Journal Transaction Time since reset was called
 int getJournalTransactionNum()
          Number of Journal Transactions in the last interval
 int getNumAddBlockOps()
          Number of add block operations in the last interval
 int getNumCreateFileOps()
          Number of file creation operations in the last interval
 int getNumDeleteFileOps()
          Number of file deletion operations in the last interval
 int getNumFilesCreated()
          Number of files created in the last interval
 int getNumFilesListed()
          Deprecated. Use getNumGetListingOps() instead
 int getNumFilesRenamed()
          Number of files renamed in the last interval
 int getNumGetBlockLocations()
          Number of NameNode.getBlockLocations(String,long,long)
 int getNumGetListingOps()
          Number of files listed in the last interval
 int getSafemodeTime()
          The time spent in the Safemode at startup
 void resetAllMinMax()
          Reset all min max times
 

Method Detail

getSafemodeTime

int getSafemodeTime()
The time spent in the Safemode at startup

Returns:
time in msec

getFSImageLoadTime

int getFSImageLoadTime()
Time spent loading the FS Image at startup

Returns:
time in msec

getJournalTransactionNum

int getJournalTransactionNum()
Number of Journal Transactions in the last interval

Returns:
number of operations

getJournalTransactionAverageTime

long getJournalTransactionAverageTime()
Average time for Journal transactions in last interval

Returns:
time in msec

getJournalTransactionMinTime

long getJournalTransactionMinTime()
The Minimum Journal Transaction Time since reset was called

Returns:
time in msec

getJournalTransactionMaxTime

long getJournalTransactionMaxTime()
The Maximum Journal Transaction Time since reset was called

Returns:
time in msec

getBlockReportNum

int getBlockReportNum()
Number of block Reports processed in the last interval

Returns:
number of operations

getBlockReportAverageTime

long getBlockReportAverageTime()
Average time for Block Report Processing in last interval

Returns:
time in msec

getBlockReportMinTime

long getBlockReportMinTime()
The Minimum Block Report Processing Time since reset was called

Returns:
time in msec

getBlockReportMaxTime

long getBlockReportMaxTime()
The Maximum Block Report Processing Time since reset was called

Returns:
time in msec

getJournalSyncNum

int getJournalSyncNum()
Number of Journal Syncs in the last interval

Returns:
number of operations

getJournalSyncAverageTime

long getJournalSyncAverageTime()
Average time for Journal Sync in last interval

Returns:
time in msec

getJournalSyncMinTime

long getJournalSyncMinTime()
The Minimum Journal Sync Time since reset was called

Returns:
time in msec

getJournalSyncMaxTime

long getJournalSyncMaxTime()
The Maximum Journal Sync Time since reset was called

Returns:
time in msec

resetAllMinMax

void resetAllMinMax()
Reset all min max times


getNumFilesCreated

int getNumFilesCreated()
Number of files created in the last interval

Returns:
number of operations

getNumGetBlockLocations

int getNumGetBlockLocations()
Number of NameNode.getBlockLocations(String,long,long)

Returns:
number of operations

getNumFilesRenamed

int getNumFilesRenamed()
Number of files renamed in the last interval

Returns:
number of operations

getNumFilesListed

@Deprecated
int getNumFilesListed()
Deprecated. Use getNumGetListingOps() instead

Number of files listed in the last interval

Returns:
number of operations

getNumGetListingOps

int getNumGetListingOps()
Number of files listed in the last interval

Returns:
number of operations

getNumCreateFileOps

int getNumCreateFileOps()
Number of file creation operations in the last interval

Returns:
number of file creation operations

getNumDeleteFileOps

int getNumDeleteFileOps()
Number of file deletion operations in the last interval

Returns:
number of file deletion operations

getNumAddBlockOps

int getNumAddBlockOps()
Number of add block operations in the last interval

Returns:
number of add block operations


Copyright © 2008 The Apache Software Foundation