Package org.apache.hadoop.ipc.metrics
Class RpcMetrics
java.lang.Object
org.apache.hadoop.ipc.metrics.RpcMetrics
@Private
@Metrics(about="Aggregate RPC metrics",
context="rpc")
public class RpcMetrics
extends Object
This class is for maintaining the various RPC statistics
and publishing them through the metrics interfaces.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeferredRpcProcessingTime(long processingTime) voidaddRpcEnQueueTime(long enQTime) Sometimes, the request time observed by the client is much longer than the queue + process time on the RPC server.Perhaps the RPC request 'waiting enQueue' took too long on the RPC server, so we should add enQueue time to RpcMetrics.voidaddRpcLockWaitTime(long waitTime) voidaddRpcProcessingTime(long processingTime) Add an RPC processing time samplevoidaddRpcQueueTime(long qTime) Add an RPC queue time samplevoidaddRpcResponseTime(long responseTime) intstatic RpcMetricscreate(Server server, Configuration conf) longReturns the number of disconnected backoffs.doublelongdoublestatic TimeUnitintdoubleReturns mean of RPC Processing Times.longReturns the number of samples that we have seen so far.doubleReturn Standard Deviation of the Processing Time.Returns a MutableRate Counter.longReturns the number of requeue calls.longReturns the number of slow calls.longlongvoidOne authentication failure eventvoidOne authentication success eventvoidOne authorization failure eventvoidOne authorization success eventvoidOne client backoff eventvoidClient was disconnected due to backoffvoidincrReceivedBytes(int count) Increment received bytes by countvoidIncrements the Requeue Calls counter.voidOne RPC call success event.voidincrSentBytes(int count) Increment sent bytes by countvoidIncrements the Slow RPC counter.name()longintvoidshutdown()Shutdown the instrumentation for the process
-
Field Details
-
DEFAULT_METRIC_TIME_UNIT
-
-
Method Details
-
name
-
create
-
numOpenConnections
-
getNumInProcessHandler
-
numOpenConnectionsPerUser
-
callQueueLength
-
numDroppedConnections
-
getTotalRequests
-
getTotalRequestsPerSecond
-
getMetricsTimeUnit
-
getMetricsTimeUnit
-
incrAuthenticationFailures
public void incrAuthenticationFailures()One authentication failure event -
incrAuthenticationSuccesses
public void incrAuthenticationSuccesses()One authentication success event -
incrAuthorizationSuccesses
public void incrAuthorizationSuccesses()One authorization success event -
incrAuthorizationFailures
public void incrAuthorizationFailures()One authorization failure event -
shutdown
public void shutdown()Shutdown the instrumentation for the process -
incrSentBytes
public void incrSentBytes(int count) Increment sent bytes by count- Parameters:
count- to increment
-
incrReceivedBytes
public void incrReceivedBytes(int count) Increment received bytes by count- Parameters:
count- to increment
-
addRpcEnQueueTime
public void addRpcEnQueueTime(long enQTime) Sometimes, the request time observed by the client is much longer than the queue + process time on the RPC server.Perhaps the RPC request 'waiting enQueue' took too long on the RPC server, so we should add enQueue time to RpcMetrics. See HADOOP-18840 for details. Add an RPC enqueue time sample- Parameters:
enQTime- the queue time
-
addRpcQueueTime
public void addRpcQueueTime(long qTime) Add an RPC queue time sample- Parameters:
qTime- the queue time
-
addRpcLockWaitTime
public void addRpcLockWaitTime(long waitTime) -
addRpcProcessingTime
public void addRpcProcessingTime(long processingTime) Add an RPC processing time sample- Parameters:
processingTime- the processing time
-
addRpcResponseTime
public void addRpcResponseTime(long responseTime) -
addDeferredRpcProcessingTime
public void addDeferredRpcProcessingTime(long processingTime) -
incrClientBackoff
public void incrClientBackoff()One client backoff event -
incrClientBackoffDisconnected
public void incrClientBackoffDisconnected()Client was disconnected due to backoff -
getClientBackoffDisconnected
public long getClientBackoffDisconnected()Returns the number of disconnected backoffs.- Returns:
- long
-
incrSlowRpc
public void incrSlowRpc()Increments the Slow RPC counter. -
incrRequeueCalls
public void incrRequeueCalls()Increments the Requeue Calls counter. -
incrRpcCallSuccesses
public void incrRpcCallSuccesses()One RPC call success event. -
getRpcProcessingTime
Returns a MutableRate Counter.- Returns:
- Mutable Rate
-
getProcessingSampleCount
public long getProcessingSampleCount()Returns the number of samples that we have seen so far.- Returns:
- long
-
getProcessingMean
public double getProcessingMean()Returns mean of RPC Processing Times.- Returns:
- double
-
getProcessingStdDev
public double getProcessingStdDev()Return Standard Deviation of the Processing Time.- Returns:
- double
-
getRpcSlowCalls
public long getRpcSlowCalls()Returns the number of slow calls.- Returns:
- long
-
getRpcRequeueCalls
@VisibleForTesting public long getRpcRequeueCalls()Returns the number of requeue calls.- Returns:
- long
-
getDeferredRpcProcessingTime
-
getDeferredRpcProcessingSampleCount
public long getDeferredRpcProcessingSampleCount() -
getDeferredRpcProcessingMean
public double getDeferredRpcProcessingMean() -
getDeferredRpcProcessingStdDev
public double getDeferredRpcProcessingStdDev() -
getTag
-
getRpcAuthorizationSuccesses
-