kfaraz commented on code in PR #12404:
URL: https://github.com/apache/druid/pull/12404#discussion_r878687055
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/Task.java:
##########
@@ -241,4 +243,20 @@ default <ContextValueType> ContextValueType
getContextValue(String key, ContextV
final ContextValueType value = getContextValue(key);
return value == null ? defaultValue : value;
}
+
+ default TaskMetadata getMetadata()
+ {
+ return new TaskMetadata(this.getId(), this.getGroupId(), this.getType());
+ }
+
+ static TaskInfo<TaskMetadata, TaskStatus> toTaskMetadataInfo(TaskInfo<Task,
TaskStatus> taskInfo)
+ {
+ return new TaskInfo<>(
+ taskInfo.getId(),
+ taskInfo.getCreatedTime(),
+ taskInfo.getStatus(),
+ taskInfo.getDataSource(),
+ taskInfo.getTask().getMetadata()
+ );
+ }
Review Comment:
TODO: not very comfortable with this.
--
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]