gianm commented on a change in pull request #6206: Fix NPE in 
KafkaSupervisor.checkpointTaskGroup
URL: https://github.com/apache/incubator-druid/pull/6206#discussion_r212164860
 
 

 ##########
 File path: 
extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/supervisor/KafkaSupervisor.java
 ##########
 @@ -1627,11 +1664,15 @@ private void checkPendingCompletionTasks() throws 
ExecutionException, Interrupte
           continue;
         }
 
-        Iterator<Map.Entry<String, TaskData>> iTask = 
group.tasks.entrySet().iterator();
+        Iterator<Entry<String, TaskData>> iTask = 
group.tasks.entrySet().iterator();
         while (iTask.hasNext()) {
-          Map.Entry<String, TaskData> task = iTask.next();
+          final Entry<String, TaskData> entry = iTask.next();
+          final String taskId = entry.getKey();
+          final TaskData taskData = entry.getValue();
+
+          Preconditions.checkNotNull(taskData.status, "task[%s] has a null 
status", taskId);
 
 Review comment:
   When will this get thrown and what will happen when it gets thrown? I'm 
wondering what the user experience is going to be like.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to