@Override public void flush(){ delegate.flush(); }
@Override public void flush(){ _delegate.flush(); }
public int flushBarrier() { delegate.flush(); int ret = 0; // Emit and flush barrier message to all downstream tasks for (Entry<Integer, CountValue> entry : msgCount.entrySet()) { int taskId = entry.getKey(); int count = entry.getValue().getValueAndSet(0); ret += count; BatchSnapshot barrierSnapshot = new BatchSnapshot(currBatchId, count); emitDirectByDelegate(taskId, TransactionCommon.BARRIER_STREAM_ID, new Values(barrierSnapshot), null, null); } delegate.flush(); return ret; }
public void flushInitBarrier() { // flush pending message in outputCollector delegate.flush(); delegate.setBatchId(TransactionCommon.INIT_BATCH_ID); BatchSnapshot barrierSnapshot = new BatchSnapshot(TransactionCommon.INIT_BATCH_ID, 0); for (Entry<Integer, CountValue> entry : msgCount.entrySet()) { entry.getValue().setValue(0); emitDirectByDelegate(entry.getKey(), TransactionCommon.BARRIER_STREAM_ID, new Values(barrierSnapshot), null, null); } delegate.flush(); delegate.setBatchId(currBatchId); }
public void flush(){ _delegate.flush();}
public void flushInitBarrier() { try { lock.writeLock().lock(); // flush pending message in outputCollector delegate.flush(); BatchGroupId batchGroupId = new BatchGroupId(groupId, TransactionCommon.INIT_BATCH_ID); BatchSnapshot barrierSnapshot = new BatchSnapshot(batchGroupId, 0); for (Entry<Integer, Integer> entry : msgCount.entrySet()) { entry.setValue(0); emitDirectByDelegate(entry.getKey(), TransactionCommon.BARRIER_STREAM_ID, new Values(batchGroupId, barrierSnapshot), null, null); } delegate.flush(); } finally { lock.writeLock().unlock(); } } }
public BatchInfo flushBarrier() { BatchInfo ret = null; try { lock.writeLock().lock(); ret = new BatchInfo(currBatchInfo); // flush pending message in outputCollector delegate.flush(); // Emit and flush barrier message to all downstream tasks BatchGroupId batchGroupId = new BatchGroupId(groupId, currBatchId); for (Entry<Integer, Integer> entry : msgCount.entrySet()) { int taskId = entry.getKey(); int count = entry.setValue(0); BatchSnapshot barrierSnapshot = new BatchSnapshot(batchGroupId, count); emitDirectByDelegate(taskId, TransactionCommon.BARRIER_STREAM_ID, new Values(batchGroupId, barrierSnapshot), null, null); } delegate.flush(); moveToNextBatch(); } finally { lock.writeLock().unlock(); } return ret; }