FederationRPCMetrics (Apache Hadoop HDFS-RBF 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.federation.metrics, class: FederationRPCMetrics

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

# Class FederationRPCMetrics

java.lang.Object
org.apache.hadoop.hdfs.server.federation.metrics.FederationRPCMetrics

All Implemented Interfaces:
  `FederationRPCMBean`

@Metrics(name="RouterRPCActivity", about="Router RPC Activity", context="dfs") public class FederationRPCMetrics extends Object implements FederationRPCMBean
Implementation of the RPC metrics collector.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FederationRPCMetrics(org.apache.hadoop.conf.Configuration conf, RouterRpcServer rpcServer)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addProcessingTime(long time)`
  Add the time to process a request in the Router from the time we receive the call until we send it to the Namenode.
  `void`
  `addProxyTime(long time, FederationNamenodeServiceState state)`
  Add the time to proxy an operation from the moment the Router sends it to the Namenode until it replied.
  `static FederationRPCMetrics`
  `create(org.apache.hadoop.conf.Configuration conf, RouterRpcServer rpcServer)`
  `long`
  `getActiveProxyOps()`
  `String`
  `getAsyncCallerPool()`
  Get the JSON representation of the async caller thread pool.
  `String`
  `getAvailableHandlerOnPerNs()`
  JSON representation of the available handler per Ns.
  `long`
  `getObserverProxyOps()`
  `double`
  `getProcessingAvg()`
  `long`
  `getProcessingOps()`
  `double`
  `getProxyAvg()`
  `long`
  `getProxyOpFailureClientOverloaded()`
  `long`
  `getProxyOpFailureCommunicate()`
  `long`
  `getProxyOpFailureStandby()`
  `long`
  `getProxyOpNoNamenodes()`
  `long`
  `getProxyOpNotImplemented()`
  `String`
  `getProxyOpPermitAcceptedPerNs()`
  Get the number of operations accepted of each namespace.
  `long`
  `getProxyOpPermitRejected()`
  Get the number of operations rejected due to lack of permits.
  `String`
  `getProxyOpPermitRejectedPerNs()`
  Get the number of operations rejected due to lack of permits of each namespace.
  `long`
  `getProxyOpRetries()`
  `long`
  `getProxyOps()`
  `long`
  `getRouterFailureLockedOps()`
  `long`
  `getRouterFailureReadOnlyOps()`
  `long`
  `getRouterFailureSafemodeOps()`
  `long`
  `getRouterFailureStateStoreOps()`
  `String`
  `getRpcClientConnections()`
  JSON representation of the RPC connections from the Router to the NNs.
  `int`
  `getRpcClientNumActiveConnections()`
  Get the number of active RPC connections between the Router and the NNs.
  `int`
  `getRpcClientNumActiveConnectionsRecently()`
  Get the number of recently active RPC connections between the Router and the NNs.
  `int`
  `getRpcClientNumConnectionPools()`
  Get the number of connection pools between the Router and a NNs.
  `int`
  `getRpcClientNumConnections()`
  Get the number of RPC connections between the Router and the NNs.
  `int`
  `getRpcClientNumCreatingConnections()`
  Get the number of RPC connections to be created.
  `int`
  `getRpcClientNumIdleConnections()`
  Get the number of idle RPC connections between the Router and the NNs.
  `int`
  `getRpcServerCallQueue()`
  `int`
  `getRpcServerNumOpenConnections()`
  Get the number of RPC connections between the clients and the Router.
  `void`
  `incrProxyOpFailureClientOverloaded()`
  `void`
  `incrProxyOpFailureCommunicate()`
  `void`
  `incrProxyOpFailureStandby()`
  `void`
  `incrProxyOpNoNamenodes()`
  `void`
  `incrProxyOpNotImplemented()`
  `void`
  `incrProxyOpPermitRejected()`
  `void`
  `incrProxyOpRetries()`
  `void`
  `incrRouterFailureLocked()`
  `void`
  `incrRouterFailureReadOnly()`
  `void`
  `incrRouterFailureSafemode()`
  `void`
  `incrRouterFailureStateStore()`
  `static void`
  `reset()`
  Reset the metrics system.

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

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

- ## Constructor Details

  - ### FederationRPCMetrics

    public FederationRPCMetrics(org.apache.hadoop.conf.Configuration conf, RouterRpcServer rpcServer)

- ## Method Details

  - ### create

    public static FederationRPCMetrics create(org.apache.hadoop.conf.Configuration conf, RouterRpcServer rpcServer)

  - ### reset

    public static void reset()
    Reset the metrics system.

  - ### incrProxyOpFailureStandby

    public void incrProxyOpFailureStandby()

  - ### getProxyOpFailureStandby

    public long getProxyOpFailureStandby()
    Specified by:
      `getProxyOpFailureStandby` in interface `FederationRPCMBean`

  - ### incrProxyOpFailureCommunicate

    public void incrProxyOpFailureCommunicate()

  - ### getProxyOpFailureCommunicate

    public long getProxyOpFailureCommunicate()
    Specified by:
      `getProxyOpFailureCommunicate` in interface `FederationRPCMBean`

  - ### incrProxyOpFailureClientOverloaded

    public void incrProxyOpFailureClientOverloaded()

  - ### getProxyOpFailureClientOverloaded

    public long getProxyOpFailureClientOverloaded()
    Specified by:
      `getProxyOpFailureClientOverloaded` in interface `FederationRPCMBean`

  - ### incrProxyOpNotImplemented

    public void incrProxyOpNotImplemented()

  - ### getProxyOpNotImplemented

    public long getProxyOpNotImplemented()
    Specified by:
      `getProxyOpNotImplemented` in interface `FederationRPCMBean`

  - ### incrProxyOpRetries

    public void incrProxyOpRetries()

  - ### getProxyOpRetries

    public long getProxyOpRetries()
    Specified by:
      `getProxyOpRetries` in interface `FederationRPCMBean`

  - ### incrProxyOpNoNamenodes

    public void incrProxyOpNoNamenodes()

  - ### getProxyOpNoNamenodes

    public long getProxyOpNoNamenodes()
    Specified by:
      `getProxyOpNoNamenodes` in interface `FederationRPCMBean`

  - ### incrRouterFailureStateStore

    public void incrRouterFailureStateStore()

  - ### getRouterFailureStateStoreOps

    public long getRouterFailureStateStoreOps()
    Specified by:
      `getRouterFailureStateStoreOps` in interface `FederationRPCMBean`

  - ### incrRouterFailureSafemode

    public void incrRouterFailureSafemode()

  - ### getRouterFailureSafemodeOps

    public long getRouterFailureSafemodeOps()
    Specified by:
      `getRouterFailureSafemodeOps` in interface `FederationRPCMBean`

  - ### incrRouterFailureReadOnly

    public void incrRouterFailureReadOnly()

  - ### getRouterFailureReadOnlyOps

    public long getRouterFailureReadOnlyOps()
    Specified by:
      `getRouterFailureReadOnlyOps` in interface `FederationRPCMBean`

  - ### incrRouterFailureLocked

    public void incrRouterFailureLocked()

  - ### getRouterFailureLockedOps

    public long getRouterFailureLockedOps()
    Specified by:
      `getRouterFailureLockedOps` in interface `FederationRPCMBean`

  - ### getRpcServerCallQueue

    @Metric({"RpcServerCallQueue","Length of the rpc server call queue"}) public int getRpcServerCallQueue()
    Specified by:
      `getRpcServerCallQueue` in interface `FederationRPCMBean`

  - ### getRpcServerNumOpenConnections

    @Metric({"RpcServerNumOpenConnections","Number of the rpc server open connections"}) public int getRpcServerNumOpenConnections()
    Description copied from interface: `FederationRPCMBean`
    Get the number of RPC connections between the clients and the Router.
    Specified by:
      `getRpcServerNumOpenConnections` in interface `FederationRPCMBean`
    Returns:
      Number of RPC connections between the clients and the Router.

  - ### getRpcClientNumConnections

    @Metric({"RpcClientNumConnections","Number of the rpc client open connections"}) public int getRpcClientNumConnections()
    Description copied from interface: `FederationRPCMBean`
    Get the number of RPC connections between the Router and the NNs.
    Specified by:
      `getRpcClientNumConnections` in interface `FederationRPCMBean`
    Returns:
      Number of RPC connections between the Router and the NNs.

  - ### getRpcClientNumActiveConnections

    @Metric({"RpcClientNumActiveConnections","Number of the rpc client active connections"}) public int getRpcClientNumActiveConnections()
    Description copied from interface: `FederationRPCMBean`
    Get the number of active RPC connections between the Router and the NNs.
    Specified by:
      `getRpcClientNumActiveConnections` in interface `FederationRPCMBean`
    Returns:
      Number of active RPC connections between the Router and the NNs.

  - ### getRpcClientNumIdleConnections

    @Metric({"RpcClientNumIdleConnections","Number of the rpc client idle connections"}) public int getRpcClientNumIdleConnections()
    Description copied from interface: `FederationRPCMBean`
    Get the number of idle RPC connections between the Router and the NNs.
    Specified by:
      `getRpcClientNumIdleConnections` in interface `FederationRPCMBean`
    Returns:
      Number of idle RPC connections between the Router and the NNs.

  - ### getRpcClientNumActiveConnectionsRecently

    @Metric({"RpcClientNumActiveConnectionsRecently","Number of the rpc client active connections recently"}) public int getRpcClientNumActiveConnectionsRecently()
    Description copied from interface: `FederationRPCMBean`
    Get the number of recently active RPC connections between the Router and the NNs.
    Specified by:
      `getRpcClientNumActiveConnectionsRecently` in interface `FederationRPCMBean`
    Returns:
      Number of recently active RPC connections between the Router and the NNs.

  - ### getRpcClientNumCreatingConnections

    @Metric({"RpcClientNumCreatingConnections","Number of the rpc client creating connections"}) public int getRpcClientNumCreatingConnections()
    Description copied from interface: `FederationRPCMBean`
    Get the number of RPC connections to be created.
    Specified by:
      `getRpcClientNumCreatingConnections` in interface `FederationRPCMBean`
    Returns:
      Number of RPC connections to be created.

  - ### getRpcClientNumConnectionPools

    @Metric({"RpcClientNumConnectionPools","Number of the rpc client connection pools"}) public int getRpcClientNumConnectionPools()
    Description copied from interface: `FederationRPCMBean`
    Get the number of connection pools between the Router and a NNs.
    Specified by:
      `getRpcClientNumConnectionPools` in interface `FederationRPCMBean`
    Returns:
      Number of connection pools between the Router and a NNs.

  - ### getRpcClientConnections

    public String getRpcClientConnections()
    Description copied from interface: `FederationRPCMBean`
    JSON representation of the RPC connections from the Router to the NNs.
    Specified by:
      `getRpcClientConnections` in interface `FederationRPCMBean`
    Returns:
      JSON string representation.

  - ### getAvailableHandlerOnPerNs

    public String getAvailableHandlerOnPerNs()
    Description copied from interface: `FederationRPCMBean`
    JSON representation of the available handler per Ns.
    Specified by:
      `getAvailableHandlerOnPerNs` in interface `FederationRPCMBean`
    Returns:
      JSON string representation.

  - ### getAsyncCallerPool

    public String getAsyncCallerPool()
    Description copied from interface: `FederationRPCMBean`
    Get the JSON representation of the async caller thread pool.
    Specified by:
      `getAsyncCallerPool` in interface `FederationRPCMBean`
    Returns:
      JSON string representation of the async caller thread pool.

  - ### addProxyTime

    public void addProxyTime(long time, FederationNamenodeServiceState state)
    Add the time to proxy an operation from the moment the Router sends it to the Namenode until it replied.
    Parameters:
      `time` - Proxy time of an operation in nanoseconds.
      `state` - NameNode state. Maybe null

  - ### getProxyAvg

    public double getProxyAvg()
    Specified by:
      `getProxyAvg` in interface `FederationRPCMBean`

  - ### getProxyOps

    public long getProxyOps()
    Specified by:
      `getProxyOps` in interface `FederationRPCMBean`

  - ### getActiveProxyOps

    public long getActiveProxyOps()
    Specified by:
      `getActiveProxyOps` in interface `FederationRPCMBean`

  - ### getObserverProxyOps

    public long getObserverProxyOps()
    Specified by:
      `getObserverProxyOps` in interface `FederationRPCMBean`

  - ### addProcessingTime

    public void addProcessingTime(long time)
    Add the time to process a request in the Router from the time we receive the call until we send it to the Namenode.
    Parameters:
      `time` - Process time of an operation in nanoseconds.

  - ### getProcessingAvg

    public double getProcessingAvg()
    Specified by:
      `getProcessingAvg` in interface `FederationRPCMBean`

  - ### getProcessingOps

    public long getProcessingOps()
    Specified by:
      `getProcessingOps` in interface `FederationRPCMBean`

  - ### incrProxyOpPermitRejected

    public void incrProxyOpPermitRejected()

  - ### getProxyOpPermitRejected

    public long getProxyOpPermitRejected()
    Description copied from interface: `FederationRPCMBean`
    Get the number of operations rejected due to lack of permits.
    Specified by:
      `getProxyOpPermitRejected` in interface `FederationRPCMBean`
    Returns:
      Number of operations rejected due to lack of permits.

  - ### getProxyOpPermitRejectedPerNs

    public String getProxyOpPermitRejectedPerNs()
    Description copied from interface: `FederationRPCMBean`
    Get the number of operations rejected due to lack of permits of each namespace.
    Specified by:
      `getProxyOpPermitRejectedPerNs` in interface `FederationRPCMBean`
    Returns:
      Number of operations rejected due to lack of permits of each namespace.

  - ### getProxyOpPermitAcceptedPerNs

    public String getProxyOpPermitAcceptedPerNs()
    Description copied from interface: `FederationRPCMBean`
    Get the number of operations accepted of each namespace.
    Specified by:
      `getProxyOpPermitAcceptedPerNs` in interface `FederationRPCMBean`
    Returns:
      Number of operations accepted of each namespace.