kfaraz commented on code in PR #16041: URL: https://github.com/apache/druid/pull/16041#discussion_r1556817746
########## indexing-service/src/main/java/org/apache/druid/indexing/common/IngestionStatsAndErrors.java: ########## @@ -48,7 +49,8 @@ public IngestionStatsAndErrors( @JsonProperty("segmentAvailabilityWaitTimeMs") long segmentAvailabilityWaitTimeMs, @JsonProperty("recordsProcessed") Map<String, Long> recordsProcessed, @Nullable @JsonProperty("segmentsRead") Long segmentsRead, - @Nullable @JsonProperty("segmentsPublished") Long segmentsPublished + @Nullable @JsonProperty("segmentsPublished") Long segmentsPublished, + @Nullable @JsonProperty("taskContext") Map<String, Object> taskContext Review Comment: The reason I suggest a separate report is not backwards compatibility, it is relevance of the field in this class/report. This report is `ingestionStatsAndErrors` and should contain only that information i.e. ingestion stats and errors. Task context is neither. Adding a separate report doesn't have any backwards compat concerns either because all tasks write out reports in a nice map format. Typically, the methods that want to write out this report would look something like this: ``` TaskReport.ReportMap createTaskReports() { return TaskReport.buildTaskReports( new IngestionStatsAndErrorsReport(...), new TaskContextReport(taskContext) ); } ``` The final report json would look like this: ``` { "ingestionStatsAndErrors": {...} "taskContext": { "param1": "value1", "param2": "value2" } } ``` cc: @YongGang -- 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: commits-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org