This is an automated email from the ASF dual-hosted git repository.

lhaiesp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git


The following commit(s) were added to refs/heads/master by this push:
     new 074af50  SAMZA-2183: print all tasks when job fails with incorrect 
container count
     new 284ff26  Merge pull request #1023 from lhaiesp/master
074af50 is described below

commit 074af509ee6a9e8985dd1b53d9a8f351c350a2da
Author: Hai Lu <[email protected]>
AuthorDate: Wed May 8 15:45:54 2019 -0700

    SAMZA-2183: print all tasks when job fails with incorrect container count
---
 .../samza/container/grouper/task/GroupByContainerCount.java   | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/samza-core/src/main/java/org/apache/samza/container/grouper/task/GroupByContainerCount.java
 
b/samza-core/src/main/java/org/apache/samza/container/grouper/task/GroupByContainerCount.java
index 23580f0..238764d 100644
--- 
a/samza-core/src/main/java/org/apache/samza/container/grouper/task/GroupByContainerCount.java
+++ 
b/samza-core/src/main/java/org/apache/samza/container/grouper/task/GroupByContainerCount.java
@@ -168,11 +168,14 @@ public class GroupByContainerCount implements 
BalancingTaskNameGrouper {
     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);
+    }
   }
 
   /**

Reply via email to