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
ConstructorsConstructorDescriptionFederationRPCMetrics(org.apache.hadoop.conf.Configuration conf, RouterRpcServer rpcServer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProcessingTime(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.voidaddProxyTime(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 FederationRPCMetricscreate(org.apache.hadoop.conf.Configuration conf, RouterRpcServer rpcServer) longGet the JSON representation of the async caller thread pool.JSON representation of the available handler per Ns.longdoublelongdoublelonglonglonglonglongGet the number of operations accepted of each namespace.longGet the number of operations rejected due to lack of permits.Get the number of operations rejected due to lack of permits of each namespace.longlonglonglonglonglongJSON representation of the RPC connections from the Router to the NNs.intGet the number of active RPC connections between the Router and the NNs.intGet the number of recently active RPC connections between the Router and the NNs.intGet the number of connection pools between the Router and a NNs.intGet the number of RPC connections between the Router and the NNs.intGet the number of RPC connections to be created.intGet the number of idle RPC connections between the Router and the NNs.intintGet the number of RPC connections between the clients and the Router.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidstatic voidreset()Reset the metrics system.
-
Constructor Details
-
FederationRPCMetrics
-
-
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:
getProxyOpFailureStandbyin interfaceFederationRPCMBean
-
incrProxyOpFailureCommunicate
public void incrProxyOpFailureCommunicate() -
getProxyOpFailureCommunicate
public long getProxyOpFailureCommunicate()- Specified by:
getProxyOpFailureCommunicatein interfaceFederationRPCMBean
-
incrProxyOpFailureClientOverloaded
public void incrProxyOpFailureClientOverloaded() -
getProxyOpFailureClientOverloaded
public long getProxyOpFailureClientOverloaded()- Specified by:
getProxyOpFailureClientOverloadedin interfaceFederationRPCMBean
-
incrProxyOpNotImplemented
public void incrProxyOpNotImplemented() -
getProxyOpNotImplemented
public long getProxyOpNotImplemented()- Specified by:
getProxyOpNotImplementedin interfaceFederationRPCMBean
-
incrProxyOpRetries
public void incrProxyOpRetries() -
getProxyOpRetries
public long getProxyOpRetries()- Specified by:
getProxyOpRetriesin interfaceFederationRPCMBean
-
incrProxyOpNoNamenodes
public void incrProxyOpNoNamenodes() -
getProxyOpNoNamenodes
public long getProxyOpNoNamenodes()- Specified by:
getProxyOpNoNamenodesin interfaceFederationRPCMBean
-
incrRouterFailureStateStore
public void incrRouterFailureStateStore() -
getRouterFailureStateStoreOps
public long getRouterFailureStateStoreOps()- Specified by:
getRouterFailureStateStoreOpsin interfaceFederationRPCMBean
-
incrRouterFailureSafemode
public void incrRouterFailureSafemode() -
getRouterFailureSafemodeOps
public long getRouterFailureSafemodeOps()- Specified by:
getRouterFailureSafemodeOpsin interfaceFederationRPCMBean
-
incrRouterFailureReadOnly
public void incrRouterFailureReadOnly() -
getRouterFailureReadOnlyOps
public long getRouterFailureReadOnlyOps()- Specified by:
getRouterFailureReadOnlyOpsin interfaceFederationRPCMBean
-
incrRouterFailureLocked
public void incrRouterFailureLocked() -
getRouterFailureLockedOps
public long getRouterFailureLockedOps()- Specified by:
getRouterFailureLockedOpsin interfaceFederationRPCMBean
-
getRpcServerCallQueue
@Metric({"RpcServerCallQueue","Length of the rpc server call queue"}) public int getRpcServerCallQueue()- Specified by:
getRpcServerCallQueuein interfaceFederationRPCMBean
-
getRpcServerNumOpenConnections
@Metric({"RpcServerNumOpenConnections","Number of the rpc server open connections"}) public int getRpcServerNumOpenConnections()Description copied from interface:FederationRPCMBeanGet the number of RPC connections between the clients and the Router.- Specified by:
getRpcServerNumOpenConnectionsin interfaceFederationRPCMBean- 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:FederationRPCMBeanGet the number of RPC connections between the Router and the NNs.- Specified by:
getRpcClientNumConnectionsin interfaceFederationRPCMBean- 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:FederationRPCMBeanGet the number of active RPC connections between the Router and the NNs.- Specified by:
getRpcClientNumActiveConnectionsin interfaceFederationRPCMBean- 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:FederationRPCMBeanGet the number of idle RPC connections between the Router and the NNs.- Specified by:
getRpcClientNumIdleConnectionsin interfaceFederationRPCMBean- 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:FederationRPCMBeanGet the number of recently active RPC connections between the Router and the NNs.- Specified by:
getRpcClientNumActiveConnectionsRecentlyin interfaceFederationRPCMBean- 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:FederationRPCMBeanGet the number of RPC connections to be created.- Specified by:
getRpcClientNumCreatingConnectionsin interfaceFederationRPCMBean- 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:FederationRPCMBeanGet the number of connection pools between the Router and a NNs.- Specified by:
getRpcClientNumConnectionPoolsin interfaceFederationRPCMBean- Returns:
- Number of connection pools between the Router and a NNs.
-
getRpcClientConnections
Description copied from interface:FederationRPCMBeanJSON representation of the RPC connections from the Router to the NNs.- Specified by:
getRpcClientConnectionsin interfaceFederationRPCMBean- Returns:
- JSON string representation.
-
getAvailableHandlerOnPerNs
Description copied from interface:FederationRPCMBeanJSON representation of the available handler per Ns.- Specified by:
getAvailableHandlerOnPerNsin interfaceFederationRPCMBean- Returns:
- JSON string representation.
-
getAsyncCallerPool
Description copied from interface:FederationRPCMBeanGet the JSON representation of the async caller thread pool.- Specified by:
getAsyncCallerPoolin interfaceFederationRPCMBean- Returns:
- JSON string representation of the async caller thread pool.
-
addProxyTime
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:
getProxyAvgin interfaceFederationRPCMBean
-
getProxyOps
public long getProxyOps()- Specified by:
getProxyOpsin interfaceFederationRPCMBean
-
getActiveProxyOps
public long getActiveProxyOps()- Specified by:
getActiveProxyOpsin interfaceFederationRPCMBean
-
getObserverProxyOps
public long getObserverProxyOps()- Specified by:
getObserverProxyOpsin interfaceFederationRPCMBean
-
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:
getProcessingAvgin interfaceFederationRPCMBean
-
getProcessingOps
public long getProcessingOps()- Specified by:
getProcessingOpsin interfaceFederationRPCMBean
-
incrProxyOpPermitRejected
public void incrProxyOpPermitRejected() -
getProxyOpPermitRejected
public long getProxyOpPermitRejected()Description copied from interface:FederationRPCMBeanGet the number of operations rejected due to lack of permits.- Specified by:
getProxyOpPermitRejectedin interfaceFederationRPCMBean- Returns:
- Number of operations rejected due to lack of permits.
-
getProxyOpPermitRejectedPerNs
Description copied from interface:FederationRPCMBeanGet the number of operations rejected due to lack of permits of each namespace.- Specified by:
getProxyOpPermitRejectedPerNsin interfaceFederationRPCMBean- Returns:
- Number of operations rejected due to lack of permits of each namespace.
-
getProxyOpPermitAcceptedPerNs
Description copied from interface:FederationRPCMBeanGet the number of operations accepted of each namespace.- Specified by:
getProxyOpPermitAcceptedPerNsin interfaceFederationRPCMBean- Returns:
- Number of operations accepted of each namespace.
-