kfaraz commented on code in PR #16226:
URL: https://github.com/apache/druid/pull/16226#discussion_r1558891350


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1683,21 +1684,29 @@
     final SimpleRowIngestionMeters buildSegmentsRowStats = new 
SimpleRowIngestionMeters();
     for (String runningTaskId : runningTaskIds) {
       try {
-        final Map<String, Object> report = 
getTaskReport(toolbox.getOverlordClient(), runningTaskId);
+        final TaskReport.ReportMap report = 
getTaskReport(toolbox.getOverlordClient(), runningTaskId);
 
         if (report == null || report.isEmpty()) {
           // task does not have a running report yet
           continue;
         }
 
-        Map<String, Object> ingestionStatsAndErrors = (Map<String, Object>) 
report.get("ingestionStatsAndErrors");
-        Map<String, Object> payload = (Map<String, Object>) 
ingestionStatsAndErrors.get("payload");
-        Map<String, Object> rowStats = (Map<String, Object>) 
payload.get("rowStats");
+        final Optional<IngestionStatsAndErrorsTaskReport> ingestionStatsReport
+            = report.findReport(IngestionStatsAndErrorsTaskReport.REPORT_KEY);
+
+        final IngestionStatsAndErrors payload;
+        if (ingestionStatsReport.isPresent()) {
+          payload = ingestionStatsReport.get().getPayload();
+        } else {
+          payload = null;
+        }
+
+        Map<String, Object> rowStats = payload.getRowStats();

Review Comment:
   Reverted this change as it was not really needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to