xvrl commented on a change in pull request #12096:
URL: https://github.com/apache/druid/pull/12096#discussion_r779792677
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ZkWorker.java
##########
@@ -63,6 +67,25 @@ public ZkWorker(Worker worker, PathChildrenCache
statusCache, final ObjectMapper
this.statusCache = statusCache;
this.cacheConverter = (ChildData input) ->
JacksonUtils.readValue(jsonMapper, input.getData(),
TaskAnnouncement.class);
+ this.taskIdExtractor = createTaskIdExtractor(jsonMapper);
+ }
+
+ static java.util.function.Function<ChildData, String>
createTaskIdExtractor(final ObjectMapper jsonMapper)
Review comment:
can we add some tests for this method to understand the expected
behavior? This would also ensure it's less likely to break if new fields are
added to the task data.
--
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]