kfaraz commented on code in PR #18341:
URL: https://github.com/apache/druid/pull/18341#discussion_r2263225964
##########
processing/src/main/java/org/apache/druid/guice/Binders.java:
##########
@@ -59,4 +60,16 @@ public static MapBinder<String, TaskLogs>
taskLogsBinder(Binder binder)
{
return PolyBind.optionBinder(binder, Key.get(TaskLogs.class));
}
+
+ /**
+ * Binds implementation of {@link TaskLogs} to the named keys for injection.
+ */
+ public static <T extends TaskLogs> void bindTaskLogs(Binder binder, String
type, Class<T> clazz)
+ {
+ PolyBind.optionBinder(binder,
Key.get(TaskLogs.class)).addBinding(type).to(clazz);
+ PolyBind.optionBinder(binder, Key.get(TaskLogs.class,
Names.named("switching.reportType"))).addBinding(type).to(clazz);
+ PolyBind.optionBinder(binder, Key.get(TaskLogs.class,
Names.named("switching.streamType"))).addBinding(type).to(clazz);
+ PolyBind.optionBinder(binder, Key.get(TaskLogs.class,
Names.named("switching.pushType"))).addBinding(type).to(clazz);
+ PolyBind.optionBinder(binder, Key.get(TaskLogs.class,
Names.named("switching.defaultType"))).addBinding(type).to(clazz);
Review Comment:
Oh, I see.
You could just move `SwitchingTaskLogs` to the same package as `TaskLogs`.
There is no reason it cannot be in `processing` module.
--
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]