Search in sources :

Example 1 with BoltFailInfo

use of org.apache.storm.hooks.info.BoltFailInfo in project storm by apache.

the class BoltOutputCollectorImpl method fail.

@Override
public void fail(Tuple input) {
    if (!ackingEnabled) {
        return;
    }
    Set<Long> roots = input.getMessageId().getAnchors();
    for (Long root : roots) {
        task.sendUnanchored(Acker.ACKER_FAIL_STREAM_ID, new Values(root), executor.getExecutorTransfer(), executor.getPendingEmits());
    }
    long delta = tupleTimeDelta((TupleImpl) input);
    if (isDebug) {
        LOG.info("BOLT fail TASK: {} TIME: {} TUPLE: {}", taskId, delta, input);
    }
    BoltFailInfo boltFailInfo = new BoltFailInfo(input, taskId, delta);
    boltFailInfo.applyOn(task.getUserContext());
    if (delta >= 0) {
        executor.getStats().boltFailedTuple(input.getSourceComponent(), input.getSourceStreamId());
        task.getTaskMetrics().boltFailedTuple(input.getSourceComponent(), input.getSourceStreamId());
    }
}
Also used : BoltFailInfo(org.apache.storm.hooks.info.BoltFailInfo) Values(org.apache.storm.tuple.Values)

Aggregations

BoltFailInfo (org.apache.storm.hooks.info.BoltFailInfo)1 Values (org.apache.storm.tuple.Values)1