Skip to content

Commit

Permalink
Change method name isFlushing to isStageFlushing and move the method
Browse files Browse the repository at this point in the history
  • Loading branch information
radek-kondziolka authored and sopel39 committed Oct 10, 2022
1 parent ba602d3 commit a2104a3
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -237,13 +237,6 @@ public synchronized void schedulingComplete()
}
}

private synchronized boolean isFlushing()
{
// to transition to flushing, there must be at least one flushing task, and all others must be flushing or finished.
return !flushingTasks.isEmpty()
&& allTasks.stream().allMatch(taskId -> finishedTasks.contains(taskId) || flushingTasks.contains(taskId));
}

@Override
public synchronized void schedulingComplete(PlanNodeId partitionedSource)
{
Expand Down Expand Up @@ -389,6 +382,13 @@ private synchronized void updateTaskStatus(TaskStatus taskStatus)
}
}

private synchronized boolean isStageFlushing()
{
// to transition to flushing, there must be at least one flushing task, and all others must be flushing or finished.
return !flushingTasks.isEmpty()
&& allTasks.stream().allMatch(taskId -> finishedTasks.contains(taskId) || flushingTasks.contains(taskId));
}

private ExecutionFailureInfo rewriteTransportFailure(ExecutionFailureInfo executionFailureInfo)
{
if (executionFailureInfo.getRemoteHost() == null || failureDetector.getState(executionFailureInfo.getRemoteHost()) != GONE) {
Expand Down

0 comments on commit a2104a3

Please sign in to comment.