Пример #1
0
 //Commit Logic
 public Task Commit(StreamMessage msg)
 {
     //tell the tracker commit is done in this operator
     batchTracker.CompleteOneOperatorCommit(msg.barrierOrCommitInfo);
     //Clean the buffer
     messagesForRecovery.Clear();
     if (messageCountMaps.ContainsKey(msg.BatchID))
     {
         messageCountMaps.Remove(msg.BatchID);
     }
     return(Task.CompletedTask);
 }
        public async Task <Task> Commit(StreamMessage msg)
        {
            //1.Save log into storage
            SaveIncrementalLogIntoStorage();
            ClearIncrementalLog(msg.BatchID);
            ClearReverseLog(msg.BatchID);
            currentBatchID++;
            ClearCountMap(msg.BatchID);
            await batchTracker.CompleteOneOperatorCommit(msg.barrierOrCommitInfo);

            return(Task.CompletedTask);
        }
 //Commit Logic
 public Task Commit(StreamMessage msg)
 {
     //tell the tracker commit is done in this operator
     if (upStreamMessageCountMaps.ContainsKey(msg.BatchID))
     {
         upStreamMessageCountMaps.Remove(msg.BatchID);
     }
     if (downStreamMessageCountMaps.ContainsKey(msg.BatchID))
     {
         downStreamMessageCountMaps.Remove(msg.BatchID);
     }
     batchTracker.CompleteOneOperatorCommit(msg.barrierOrCommitInfo);
     return(Task.CompletedTask);
 }