Package org.apache.avro.ipc.stats
Class StatsPlugin
java.lang.Object
org.apache.avro.ipc.RPCPlugin
org.apache.avro.ipc.stats.StatsPlugin
Collects count and latency statistics about RPC calls. Keeps data for every
method. Can be added to a Requestor (client) or Responder (server).
This uses milliseconds as the standard unit of measure throughout the class,
stored in floats.
-
Field Summary
Modifier and TypeFieldDescriptionStatic declaration of histogram buckets.How long I've been alive -
Constructor Summary
ConstructorDescriptionConstruct a plugin with default (system) ticks, and default histogram segmentation.StatsPlugin
(org.apache.avro.ipc.stats.Stopwatch.Ticks ticks, org.apache.avro.ipc.stats.Histogram.Segmenter<?, Float> floatSegmenter, org.apache.avro.ipc.stats.Histogram.Segmenter<?, Integer> integerSegmenter) Construct a plugin with custom Ticks and Segmenter implementations. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clientReceiveResponse
(RPCContext context) This method is invoked at the client after the call is executed, and after the client receives the responsevoid
clientSendRequest
(RPCContext context) This method is invoked at the client before it issues the RPC call.void
serverReceiveRequest
(RPCContext context) This method is invoked at the RPC server when the request is received, but before the call itself is executedvoid
serverSendResponse
(RPCContext context) This method is invoked at the server before the response is executed, but before the response has been formulatedMethods inherited from class org.apache.avro.ipc.RPCPlugin
clientFinishConnect, clientStartConnect, serverConnecting
-
Field Details
-
LATENCY_SEGMENTER
Static declaration of histogram buckets. -
PAYLOAD_SEGMENTER
-
startupTime
How long I've been alive
-
-
Constructor Details
-
StatsPlugin
public StatsPlugin(org.apache.avro.ipc.stats.Stopwatch.Ticks ticks, org.apache.avro.ipc.stats.Histogram.Segmenter<?, Float> floatSegmenter, org.apache.avro.ipc.stats.Histogram.Segmenter<?, Integer> integerSegmenter) Construct a plugin with custom Ticks and Segmenter implementations. -
StatsPlugin
public StatsPlugin()Construct a plugin with default (system) ticks, and default histogram segmentation.
-
-
Method Details
-
serverReceiveRequest
Description copied from class:RPCPlugin
This method is invoked at the RPC server when the request is received, but before the call itself is executed- Overrides:
serverReceiveRequest
in classRPCPlugin
- Parameters:
context
- the per-call rpc context (in/out parameter)
-
serverSendResponse
Description copied from class:RPCPlugin
This method is invoked at the server before the response is executed, but before the response has been formulated- Overrides:
serverSendResponse
in classRPCPlugin
- Parameters:
context
- the per-call rpc context (in/out parameter)
-
clientSendRequest
Description copied from class:RPCPlugin
This method is invoked at the client before it issues the RPC call.- Overrides:
clientSendRequest
in classRPCPlugin
- Parameters:
context
- the per-call rpc context (in/out parameter)
-
clientReceiveResponse
Description copied from class:RPCPlugin
This method is invoked at the client after the call is executed, and after the client receives the response- Overrides:
clientReceiveResponse
in classRPCPlugin
- Parameters:
context
- the per-call rpc context
-