github-advanced-security[bot] commented on code in PR #19541:
URL: https://github.com/apache/druid/pull/19541#discussion_r3337591300
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorSpec.java:
##########
@@ -303,4 +370,107 @@
@Nullable Integer taskCount
);
+ /**
+ * Returns a builder pre-populated with this spec's values (including
injected services), so callers
+ * can produce a modified copy without mutating this instance. Subclasses
return their own builder.
+ */
+ public abstract Builder<?> toBuilder();
+
+ /**
+ * Self-typed builder for {@link SeekableStreamSupervisorSpec} and its
subclasses. Holds the spec's
+ * components and injected services; subclasses implement {@link #self()}
and {@link #build()} to
+ * reconstruct the concrete spec. Setter methods correspond to fields a
restart comparison may
+ * neutralize (see {@link #requireRestart}).
+ */
+ public abstract static class Builder<T extends Builder<T>>
+ {
+ protected String id;
+ protected DataSchema dataSchema;
+ protected SeekableStreamSupervisorIOConfig ioConfig;
+ protected SeekableStreamSupervisorTuningConfig tuningConfig;
+ protected Map<String, Object> context;
+ protected Boolean suspended;
+ protected TaskStorage taskStorage;
+ protected TaskMaster taskMaster;
+ protected IndexerMetadataStorageCoordinator
indexerMetadataStorageCoordinator;
+ protected SeekableStreamIndexTaskClientFactory indexTaskClientFactory;
+ protected ObjectMapper mapper;
+ protected ServiceEmitter emitter;
+ protected DruidMonitorSchedulerConfig monitorSchedulerConfig;
+ protected RowIngestionMetersFactory rowIngestionMetersFactory;
+ protected SupervisorStateManagerConfig supervisorStateManagerConfig;
+
+ protected abstract T self();
+
+ public abstract SeekableStreamSupervisorSpec build();
+
+ /**
+ * Copies all fields (components and injected services) from an existing
spec into this builder.
+ */
+ public T copyFrom(SeekableStreamSupervisorSpec spec)
+ {
+ this.id = spec.id;
+ this.dataSchema = spec.getDataSchema();
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [SeekableStreamSupervisorSpec.getDataSchema](1) should be avoided
because it has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/11284)
--
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]