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


##########
indexing-service/src/main/java/org/apache/druid/guice/IndexingServiceTaskLogsModule.java:
##########
@@ -39,13 +42,22 @@ public class IndexingServiceTaskLogsModule implements Module
   public void configure(Binder binder)
   {
     PolyBind.createChoice(binder, "druid.indexer.logs.type", 
Key.get(TaskLogs.class), Key.get(FileTaskLogs.class));
+    PolyBind.createChoice(binder, "druid.indexer.logs.delegate.type", 
Key.get(TaskLogs.class, Names.named("delegate")), Key.get(FileTaskLogs.class));

Review Comment:
   To ensure that extensions register themselves correctly as a valid type for 
say `druid.indexer.logs.switching.logsType`, you would need to add a utility 
method in `Binders`, say `bindTaskLogs` and invoke it from all the relevant 
extension modules.
   
   ```java
   public static <T extends TaskLogs> void bindTaskLogs(Binder binder, String 
type, Class<T> clazz) {
       // bind to `druid.indexer.logs.type`
       // bind to `druid.indexer.logs.switching.reportsType`
       // bind to `druid.indexer.logs.switching.logsType`
   }
   ```



-- 
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