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
FieldsModifier and TypeFieldDescriptionStatic declaration of histogram buckets.How long I've been alive -
Constructor Summary
ConstructorsConstructorDescriptionConstruct 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 TypeMethodDescriptionvoidclientReceiveResponse(RPCContext context) This method is invoked at the client after the call is executed, and after the client receives the responsevoidclientSendRequest(RPCContext context) This method is invoked at the client before it issues the RPC call.voidserverReceiveRequest(RPCContext context) This method is invoked at the RPC server when the request is received, but before the call itself is executedvoidserverSendResponse(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:RPCPluginThis method is invoked at the RPC server when the request is received, but before the call itself is executed- Overrides:
serverReceiveRequestin classRPCPlugin- Parameters:
context- the per-call rpc context (in/out parameter)
-
serverSendResponse
Description copied from class:RPCPluginThis method is invoked at the server before the response is executed, but before the response has been formulated- Overrides:
serverSendResponsein classRPCPlugin- Parameters:
context- the per-call rpc context (in/out parameter)
-
clientSendRequest
Description copied from class:RPCPluginThis method is invoked at the client before it issues the RPC call.- Overrides:
clientSendRequestin classRPCPlugin- Parameters:
context- the per-call rpc context (in/out parameter)
-
clientReceiveResponse
Description copied from class:RPCPluginThis method is invoked at the client after the call is executed, and after the client receives the response- Overrides:
clientReceiveResponsein classRPCPlugin- Parameters:
context- the per-call rpc context
-