public class LatencyMonitorComputation extends LatencyTrackerComputation
Modifier and Type | Field and Description |
---|---|
protected String |
basePrefix |
protected com.codahale.metrics.graphite.GraphiteSender |
graphite |
protected String |
host |
protected int |
port |
protected boolean |
udp |
codec, count, intervalMs, logGroups, logNames, manager, OUTPUT_STREAM, remaining, verbose
Constructor and Description |
---|
LatencyMonitorComputation(LogManager manager,
List<String> logNames,
String host,
int port,
boolean udp,
String basePrefix,
String computationName,
int intervalSecond,
int count,
boolean verbose,
Codec<Record> codec) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called when the framework is ready to shutdown the computation.
|
void |
init(ComputationContext context)
Called when the framework has registered the computation successfully.
|
void |
processTimer(ComputationContext context,
String key,
long timestamp)
Process a timer callback previously set via
ComputationContext.setTimer(String, long) . |
debug, decodeKey, encodeKey, encodeLatency, error, getLatenciesForPartition, info, processRecord
metadata, processFailure, processRetry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
signalStop
protected final int port
protected final boolean udp
protected final String basePrefix
protected com.codahale.metrics.graphite.GraphiteSender graphite
public LatencyMonitorComputation(LogManager manager, List<String> logNames, String host, int port, boolean udp, String basePrefix, String computationName, int intervalSecond, int count, boolean verbose, Codec<Record> codec)
public void init(ComputationContext context)
Computation
init
in interface Computation
init
in class LatencyTrackerComputation
context
- The computation context object provided by the system.public void processTimer(ComputationContext context, String key, long timestamp)
Computation
ComputationContext.setTimer(String, long)
.processTimer
in interface Computation
processTimer
in class LatencyTrackerComputation
context
- The computation context object provided by the system.key
- The name of the timer.timestamp
- The timestamp (in ms) for which the callback was scheduled.public void destroy()
Computation
destroy
in interface Computation
destroy
in class LatencyTrackerComputation
Copyright © 2018 Nuxeo. All rights reserved.