Skip to content

Commit

Permalink
Inline and remove isRunningOrDone
Browse files Browse the repository at this point in the history
Inline and remove DistributedStagesSchedulerState.isRunningOrDone
  • Loading branch information
Sunning Go authored and sopel39 committed Jan 4, 2022
1 parent 36c8f9e commit 331770e
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ private synchronized Optional<DistributedStagesScheduler> createDistributedStage
attempt);
this.distributedStagesScheduler.set(distributedStagesScheduler);
distributedStagesScheduler.addStateChangeListener(state -> {
if (queryStateMachine.getQueryState() == QueryState.STARTING && state.isRunningOrDone()) {
if (queryStateMachine.getQueryState() == QueryState.STARTING && (state == DistributedStagesSchedulerState.RUNNING || state.isDone())) {
queryStateMachine.transitionToRunning();
}

Expand Down Expand Up @@ -1676,11 +1676,6 @@ public boolean isFailure()
{
return failureState;
}

public boolean isRunningOrDone()
{
return this == RUNNING || isDone();
}
}

private static class DistributedStagesSchedulerStateMachine
Expand Down

0 comments on commit 331770e

Please sign in to comment.