Class LatencyMonitorComputation
java.lang.Object
org.nuxeo.lib.stream.computation.AbstractComputation
org.nuxeo.lib.stream.tools.command.LatencyTrackerComputation
org.nuxeo.lib.stream.tools.command.LatencyMonitorComputation
- All Implemented Interfaces:
Computation
A computation that sends periodically latencies to graphite.
- Since:
- 10.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected io.dropwizard.metrics5.graphite.GraphiteSenderprotected final Stringprotected final booleanprotected final intprotected final booleanFields inherited from class org.nuxeo.lib.stream.tools.command.LatencyTrackerComputation
codec, count, intervalMs, logGroups, logNames, manager, OUTPUT_STREAM, refreshGroupCounter, remaining, verboseFields inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
INPUT_1, INPUT_2, INPUT_3, INPUT_NULL, metadata, OUTPUT_1, OUTPUT_2, OUTPUT_3, OUTPUT_4 -
Constructor Summary
ConstructorsConstructorDescriptionLatencyMonitorComputation(LogManager manager, List<Name> logNames, String host, int port, boolean udp, String basePrefix, String computationName, int intervalSecond, int count, boolean partition, boolean verbose, Codec<Record> codec) LatencyMonitorComputation(LogManager manager, List<Name> logNames, String host, int port, boolean udp, String basePrefix, String computationName, int intervalSecond, int count, boolean verbose, Codec<Record> codec) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Called when the framework is ready to shutdown the computation.voidinit(ComputationContext context) Called when the framework has registered the computation successfully.protected voidprocessLatencies(ComputationContext context, LogPartitionGroup logGroup, List<Latency> latencies) protected voidpublishMetrics(Latency latency, String prefix) Methods inherited from class org.nuxeo.lib.stream.tools.command.LatencyTrackerComputation
decodeKey, encodeKey, encodeLatency, getLogGroup, processRecord, processTimer, refreshGroupMethods inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
metadata, processFailure, processRetryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.lib.stream.computation.Computation
signalStop
-
Field Details
-
host
-
port
protected final int port -
udp
protected final boolean udp -
basePrefix
-
graphite
protected io.dropwizard.metrics5.graphite.GraphiteSender graphite -
partition
protected final boolean partition
-
-
Constructor Details
-
LatencyMonitorComputation
@Deprecated public LatencyMonitorComputation(LogManager manager, List<Name> logNames, String host, int port, boolean udp, String basePrefix, String computationName, int intervalSecond, int count, boolean verbose, Codec<Record> codec) Deprecated. -
LatencyMonitorComputation
-
-
Method Details
-
init
Description copied from interface:ComputationCalled when the framework has registered the computation successfully. Gives users a first opportunity to schedule timer callbacks and produce records. This method can be called multiple times.- Specified by:
initin interfaceComputation- Overrides:
initin classLatencyTrackerComputation- Parameters:
context- The computation context object provided by the system.
-
processLatencies
protected void processLatencies(ComputationContext context, LogPartitionGroup logGroup, List<Latency> latencies) - Overrides:
processLatenciesin classLatencyTrackerComputation
-
publishMetrics
-
destroy
public void destroy()Description copied from interface:ComputationCalled when the framework is ready to shutdown the computation. Gives users a chance to perform some cleanup before the process is killed.- Specified by:
destroyin interfaceComputation- Overrides:
destroyin classLatencyTrackerComputation
-