use of com.alibaba.jstorm.client.spout.IAckValueSpout in project jstorm by alibaba.
the class AckSpoutMsg method run.
public void run() {
if (JStormDebugger.isDebug(id)) {
LOG.info("Acking message rootId:{}, messageId:{}", id, msgId);
}
if (spout instanceof IAckValueSpout) {
IAckValueSpout ackValueSpout = (IAckValueSpout) spout;
ackValueSpout.ack(msgId, values);
} else {
spout.ack(msgId);
}
long latencyStart = tupleInfo.getTimestamp(), lifeCycleStart = 0;
if (latencyStart != 0 && JStormMetrics.enabled) {
long endTime = System.currentTimeMillis();
if (tuple != null && tuple instanceof TupleExt) {
lifeCycleStart = ((TupleExt) tuple).getCreationTimeStamp();
}
task_stats.spout_acked_tuple(stream, latencyStart, lifeCycleStart, endTime);
}
}
Aggregations