use of com.alibaba.jstorm.transactional.bolt.TransactionBolt.CountValue in project jstorm by alibaba.
the class TransactionOutputCollector method flushBarrier.
public void flushBarrier() {
// flush pending message in outputCollector
flush();
// Emit and flush barrier message to all downstream tasks
for (Entry<Integer, CountValue> entry : currBatchTracker.sendMsgCount.entrySet()) {
int taskId = entry.getKey();
CountValue count = entry.getValue();
BatchSnapshot snapshot = new BatchSnapshot(currBatchTracker.getBatchGroupId(), count.count);
emitDirectByDelegate(taskId, TransactionCommon.BARRIER_STREAM_ID, null, new Values(new BatchGroupId(currBatchTracker.getBatchGroupId()), snapshot), null);
count.count = 0;
}
flush();
}
Aggregations