From 455462e271bbc4fb1fc1e48adb7ef51717fbcdfc Mon Sep 17 00:00:00 2001 From: Jeremy Beard Date: Tue, 30 Apr 2019 10:26:05 -0400 Subject: [PATCH] [ENV-429] Revert to previous step submission concurrency model (#299) --- .../java/com/cloudera/labs/envelope/run/Runner.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/cloudera/labs/envelope/run/Runner.java b/core/src/main/java/com/cloudera/labs/envelope/run/Runner.java index d80d142..e87156f 100644 --- a/core/src/main/java/com/cloudera/labs/envelope/run/Runner.java +++ b/core/src/main/java/com/cloudera/labs/envelope/run/Runner.java @@ -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); @@ -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)); }