Skip to content

Commit

Permalink
[ENV-429] Revert to previous step submission concurrency model (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Beard authored and Ian Buss committed Apr 30, 2019
1 parent 2832c35 commit 455462e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/src/main/java/com/cloudera/labs/envelope/run/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ else if (step instanceof TaskStep) {
LOG.debug("Finished looking into step: " + step.getName());
}

// Wait for the submitted steps that haven't yet finished
awaitAllOffMainThreadsFinished(offMainThreadSteps);
offMainThreadSteps.clear();

// Add all steps created while looping through previous set of steps.
steps.addAll(newSteps);

Expand All @@ -303,14 +307,8 @@ else if (step instanceof TaskStep) {
"that do not exist. Steps: " + steps);
}
previousStepStates = stepStates;

// Avoid the driver getting bogged down in checking for new steps to submit
Thread.sleep(20);
}

// Wait for the submitted steps that haven't yet finished
awaitAllOffMainThreadsFinished(offMainThreadSteps);

LOG.debug("Finished batch for steps: {}", StepUtils.stepNamesAsString(steps));
}

Expand Down

0 comments on commit 455462e

Please sign in to comment.