use of backtype.storm.task.ICollectorCallback in project jstorm by alibaba.
the class TransactionSpoutOutputCollector method emit.
@Override
public List<Integer> emit(String streamId, List<Object> tuple, Object messageId, ICollectorCallback callback) {
try {
//waitActive();
lock.readLock().lock();
List<Object> tupleWithId = new ArrayList<Object>();
tupleWithId.add(new BatchGroupId(groupId, currBatchId));
tupleWithId.addAll(tuple);
delegate.emit(streamId, tupleWithId, null, (callback != null) ? callback : new CollectorCallback());
//currBatchInfo.endPos = messageId;
} finally {
lock.readLock().unlock();
}
return null;
}
use of backtype.storm.task.ICollectorCallback in project jstorm by alibaba.
the class TransactionSpoutOutputCollector method emitDirect.
@Override
public void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId, ICollectorCallback callback) {
try {
//waitActive();
lock.readLock().lock();
List<Object> tupleWithId = new ArrayList<Object>();
tupleWithId.add(new BatchGroupId(groupId, currBatchId));
tupleWithId.addAll(tuple);
delegate.emitDirect(taskId, streamId, tupleWithId, null, (callback != null) ? callback : new CollectorCallback());
//currBatchInfo.endPos = messageId;
} finally {
lock.readLock().unlock();
}
}
Aggregations