YongGang commented on code in PR #14887:
URL: https://github.com/apache/druid/pull/14887#discussion_r1300510528
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesPeonLifecycle.java:
##########
@@ -145,6 +153,28 @@ protected synchronized TaskStatus run(Job job, long
launchTimeout, long timeout)
}
}
+ private void writeTaskPayload(Task task)
+ {
+ try {
+ Path file = Files.createTempFile(taskId.getOriginalTaskId(),
"task.json");
+ try {
Review Comment:
The nested try-catch seems can be simplified.
##########
services/src/main/java/org/apache/druid/cli/CliPeon.java:
##########
@@ -282,9 +290,15 @@ public Supplier<Map<String, Object>>
heartbeatDimensions(Task task)
@Provides
@LazySingleton
- public Task readTask(@Json ObjectMapper mapper,
ExecutorLifecycleConfig config)
+ public Task readTask(@Json ObjectMapper mapper, @Smile ObjectMapper
smileMapper, ExecutorLifecycleConfig config, TaskPayloadManager
taskPayloadManager, TaskConfig taskConfig)
Review Comment:
What's the reason to use a Smile mapper? Seems same as Json mapper.
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/taskadapter/TaskAdapter.java:
##########
@@ -31,4 +32,5 @@ public interface TaskAdapter
Task toTask(Job from) throws IOException;
+ K8sTaskId getTaskId(Job from) throws IOException;
Review Comment:
Seems this method has same implementation in the subclasses, maybe move here
as a default method.
--
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]