Skip to content

Commit

Permalink
SAMZA-2183: print all tasks when job fails with incorrect container c…
Browse files Browse the repository at this point in the history
…ount
  • Loading branch information
lhaiesp committed May 8, 2019
1 parent ab72618 commit 074af50
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,14 @@ private void validateTasks(Set<TaskModel> tasks) {
if (tasks.size() <= 0)
throw new IllegalArgumentException("No tasks found. Likely due to no input partitions. Can't run a job with no tasks.");

if (tasks.size() < containerCount)
throw new IllegalArgumentException(String.format(
if (tasks.size() < containerCount) {
String msg = String.format(
"Your container count (%s) is larger than your task count (%s). Can't have containers with nothing to do, so aborting.",
containerCount,
tasks.size()));
containerCount, tasks.size());
LOG.error(msg);
LOG.info("List of all task models: {}", tasks);
throw new IllegalArgumentException(msg);
}
}

/**
Expand Down

0 comments on commit 074af50

Please sign in to comment.