jtuglu-netflix commented on code in PR #18082:
URL: https://github.com/apache/druid/pull/18082#discussion_r2147327847
##########
extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/RabbitStreamIndexTask.java:
##########
@@ -48,21 +50,25 @@ public class RabbitStreamIndexTask extends
SeekableStreamIndexTask<String, Long,
@JsonCreator
public RabbitStreamIndexTask(
@JsonProperty("id") String id,
+ @JsonProperty("supervisorId") @Nullable String supervisorId,
@JsonProperty("resource") TaskResource taskResource,
@JsonProperty("dataSchema") DataSchema dataSchema,
@JsonProperty("tuningConfig") RabbitStreamIndexTaskTuningConfig
tuningConfig,
@JsonProperty("ioConfig") RabbitStreamIndexTaskIOConfig ioConfig,
@JsonProperty("context") Map<String, Object> context,
- @JacksonInject ObjectMapper configMapper)
+ @JacksonInject ObjectMapper configMapper
+ )
{
super(
getOrMakeId(id, dataSchema.getDataSource(), TYPE),
+ supervisorId,
taskResource,
dataSchema,
tuningConfig,
ioConfig,
context,
- getFormattedGroupId(dataSchema.getDataSource(), TYPE));
+ getFormattedGroupId(Configs.valueOrDefault(supervisorId,
dataSchema.getDataSource()), TYPE)
Review Comment:
Yeah, I've thought about that – you can use the `getType()` method from the
base `AbstractTask` to create the group ID for all subclasses in the base
class, but it's a non-static method so we'd need to make this static. I'd
prefer to change that in a separate PR, given this PR is already changing a lot.
##########
extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/RabbitStreamIndexTask.java:
##########
@@ -48,21 +50,25 @@ public class RabbitStreamIndexTask extends
SeekableStreamIndexTask<String, Long,
@JsonCreator
public RabbitStreamIndexTask(
@JsonProperty("id") String id,
+ @JsonProperty("supervisorId") @Nullable String supervisorId,
@JsonProperty("resource") TaskResource taskResource,
@JsonProperty("dataSchema") DataSchema dataSchema,
@JsonProperty("tuningConfig") RabbitStreamIndexTaskTuningConfig
tuningConfig,
@JsonProperty("ioConfig") RabbitStreamIndexTaskIOConfig ioConfig,
@JsonProperty("context") Map<String, Object> context,
- @JacksonInject ObjectMapper configMapper)
+ @JacksonInject ObjectMapper configMapper
+ )
{
super(
getOrMakeId(id, dataSchema.getDataSource(), TYPE),
+ supervisorId,
taskResource,
dataSchema,
tuningConfig,
ioConfig,
context,
- getFormattedGroupId(dataSchema.getDataSource(), TYPE));
+ getFormattedGroupId(Configs.valueOrDefault(supervisorId,
dataSchema.getDataSource()), TYPE)
Review Comment:
Yeah, I've thought about that – you can use the `getType()` method from the
base `AbstractTask` to create the group ID for all subclasses in the base
class, but it's (weirdly) a non-static method so we'd need to make this static.
I'd prefer to change that in a separate PR, given this PR is already changing a
lot.
--
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]