NameNodeMetrics (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.namenode.metrics, class: NameNodeMetrics

Package org.apache.hadoop.hdfs.server.namenode.metrics

# Class NameNodeMetrics

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics

@Metrics(name="NameNodeActivity", about="NameNode metrics", context="dfs") public class NameNodeMetrics extends Object
This class is for maintaining the various NameNode activity statistics and publishing them through the metrics interfaces.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addBlockOpsBatched(int count)`
  `void`
  `addCacheBlockReport(long latency)`
  `void`
  `addEditLogFetchTime(long elapsed)`
  `void`
  `addEditLogTailInterval(long elapsed)`
  `void`
  `addEditLogTailTime(long elapsed)`
  `void`
  `addGenerateEDEKTime(long latency)`
  `void`
  `addGetAliasMap(long latency)`
  `void`
  `addGetEdit(long latency)`
  `void`
  `addGetImage(long latency)`
  `void`
  `addNumEditLogLoaded(long loaded)`
  `void`
  `addPutImage(long latency)`
  `void`
  `addResourceCheckTime(long latency)`
  `void`
  `addStorageBlockReport(long latency)`
  `void`
  `addSync(long elapsed)`
  `void`
  `addTransaction(long latency)`
  `void`
  `addWarmUpEDEKTime(long latency)`
  `static NameNodeMetrics`
  `create(org.apache.hadoop.conf.Configuration conf, HdfsServerConstants.NamenodeRole r)`
  `void`
  `decrPendingDeleteBlocksCount()`
  `org.apache.hadoop.metrics2.source.JvmMetrics`
  `getJvmMetrics()`
  `void`
  `incNumTimesReReplicationNotScheduled()`
  `void`
  `incrAddBlockOps()`
  `void`
  `incrAllowSnapshotOps()`
  `void`
  `incrBlockReceivedAndDeletedOps()`
  `void`
  `incrCreateFileOps()`
  `void`
  `incrCreateSnapshotOps()`
  `void`
  `incrCreateSymlinkOps()`
  `void`
  `incrDeleteFileOps()`
  `void`
  `incrDeleteSnapshotOps()`
  `void`
  `incrDisAllowSnapshotOps()`
  `void`
  `incrFileInfoOps()`
  `void`
  `incrFilesAppended()`
  `void`
  `incrFilesCreated()`
  `void`
  `incrFilesDeleted(long delta)`
  `void`
  `incrFilesInGetListingOps(int delta)`
  `void`
  `incrFilesRenamed()`
  `void`
  `incrFilesTruncated()`
  `void`
  `incrGetAdditionalDatanodeOps()`
  `void`
  `incrGetBlockLocations()`
  `void`
  `incrGetLinkTargetOps()`
  `void`
  `incrGetListingOps()`
  `void`
  `incrListSnapshotsOps()`
  `void`
  `incrListSnapshottableDirOps()`
  `void`
  `incrPendingDeleteBlocksCount(int size)`
  `void`
  `incrRenameSnapshotOps()`
  `void`
  `incrSnapshotDiffReportOps()`
  `void`
  `incrTransactionsBatchedInSync(long count)`
  `void`
  `incSuccessfulReReplications()`
  `void`
  `incTimeoutReReplications()`
  `void`
  `setBlockOpsQueued(int size)`
  `void`
  `setDeleteBlocksQueued(int size)`
  `void`
  `setFsImageLoadTime(long elapsed)`
  `void`
  `setPendingEditsCount(int size)`
  `void`
  `setSafeModeTime(long elapsed)`
  `void`
  `shutdown()`
  `long`
  `totalFileOps()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### totalFileOps

    @Metric("Number of file system operations") public long totalFileOps()

  - ### create

    public static NameNodeMetrics create(org.apache.hadoop.conf.Configuration conf, HdfsServerConstants.NamenodeRole r)

  - ### getJvmMetrics

    public org.apache.hadoop.metrics2.source.JvmMetrics getJvmMetrics()

  - ### shutdown

    public void shutdown()

  - ### incrGetBlockLocations

    public void incrGetBlockLocations()

  - ### incrFilesCreated

    public void incrFilesCreated()

  - ### incrCreateFileOps

    public void incrCreateFileOps()

  - ### incrFilesAppended

    public void incrFilesAppended()

  - ### incrAddBlockOps

    public void incrAddBlockOps()

  - ### incrGetAdditionalDatanodeOps

    public void incrGetAdditionalDatanodeOps()

  - ### incrFilesRenamed

    public void incrFilesRenamed()

  - ### incrFilesTruncated

    public void incrFilesTruncated()

  - ### incrFilesDeleted

    public void incrFilesDeleted(long delta)

  - ### incrDeleteFileOps

    public void incrDeleteFileOps()

  - ### incrGetListingOps

    public void incrGetListingOps()

  - ### incrFilesInGetListingOps

    public void incrFilesInGetListingOps(int delta)

  - ### incrFileInfoOps

    public void incrFileInfoOps()

  - ### incrCreateSymlinkOps

    public void incrCreateSymlinkOps()

  - ### incrGetLinkTargetOps

    public void incrGetLinkTargetOps()

  - ### incrAllowSnapshotOps

    public void incrAllowSnapshotOps()

  - ### incrDisAllowSnapshotOps

    public void incrDisAllowSnapshotOps()

  - ### incrCreateSnapshotOps

    public void incrCreateSnapshotOps()

  - ### incrDeleteSnapshotOps

    public void incrDeleteSnapshotOps()

  - ### incrRenameSnapshotOps

    public void incrRenameSnapshotOps()

  - ### incrListSnapshottableDirOps

    public void incrListSnapshottableDirOps()

  - ### incrListSnapshotsOps

    public void incrListSnapshotsOps()

  - ### incrSnapshotDiffReportOps

    public void incrSnapshotDiffReportOps()

  - ### incrBlockReceivedAndDeletedOps

    public void incrBlockReceivedAndDeletedOps()

  - ### setBlockOpsQueued

    public void setBlockOpsQueued(int size)

  - ### setDeleteBlocksQueued

    public void setDeleteBlocksQueued(int size)

  - ### incrPendingDeleteBlocksCount

    public void incrPendingDeleteBlocksCount(int size)

  - ### decrPendingDeleteBlocksCount

    public void decrPendingDeleteBlocksCount()

  - ### addBlockOpsBatched

    public void addBlockOpsBatched(int count)

  - ### setPendingEditsCount

    public void setPendingEditsCount(int size)

  - ### addTransaction

    public void addTransaction(long latency)

  - ### incrTransactionsBatchedInSync

    public void incrTransactionsBatchedInSync(long count)

  - ### incSuccessfulReReplications

    public void incSuccessfulReReplications()

  - ### incNumTimesReReplicationNotScheduled

    public void incNumTimesReReplicationNotScheduled()

  - ### incTimeoutReReplications

    public void incTimeoutReReplications()

  - ### addSync

    public void addSync(long elapsed)

  - ### setFsImageLoadTime

    public void setFsImageLoadTime(long elapsed)

  - ### addStorageBlockReport

    public void addStorageBlockReport(long latency)

  - ### addCacheBlockReport

    public void addCacheBlockReport(long latency)

  - ### setSafeModeTime

    public void setSafeModeTime(long elapsed)

  - ### addGetEdit

    public void addGetEdit(long latency)

  - ### addGetImage

    public void addGetImage(long latency)

  - ### addGetAliasMap

    public void addGetAliasMap(long latency)

  - ### addPutImage

    public void addPutImage(long latency)

  - ### addGenerateEDEKTime

    public void addGenerateEDEKTime(long latency)

  - ### addWarmUpEDEKTime

    public void addWarmUpEDEKTime(long latency)

  - ### addResourceCheckTime

    public void addResourceCheckTime(long latency)

  - ### addEditLogTailTime

    public void addEditLogTailTime(long elapsed)

  - ### addEditLogFetchTime

    public void addEditLogFetchTime(long elapsed)

  - ### addNumEditLogLoaded

    public void addNumEditLogLoaded(long loaded)

  - ### addEditLogTailInterval

    public void addEditLogTailInterval(long elapsed)