github-code-scanning[bot] commented on code in PR #15024:
URL: https://github.com/apache/druid/pull/15024#discussion_r1338943426
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/input/table/RichSegmentDescriptor.java:
##########
@@ -23,54 +23,71 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
import org.apache.druid.query.SegmentDescriptor;
+import org.apache.druid.server.coordination.DruidServerMetadata;
import org.joda.time.Interval;
import javax.annotation.Nullable;
import java.util.Objects;
+import java.util.Set;
/**
* Like {@link SegmentDescriptor}, but provides both the full interval and the
clipped interval for a segment.
* (SegmentDescriptor only provides the clipped interval.)
- *
+ * <br>
* To keep the serialized form lightweight, the full interval is only
serialized if it is different from the
* clipped interval.
- *
+ * <br>
* It is possible to deserialize this class as {@link SegmentDescriptor}.
However, going the other direction is
* not a good idea, because the {@link #fullInterval} will not end up being
set correctly.
*/
public class RichSegmentDescriptor extends SegmentDescriptor
{
@Nullable
private final Interval fullInterval;
+ private final Set<DruidServerMetadata> servers;
public RichSegmentDescriptor(
final Interval fullInterval,
final Interval interval,
final String version,
- final int partitionNumber
+ final int partitionNumber,
+ final Set<DruidServerMetadata> servers
)
{
super(interval, version, partitionNumber);
this.fullInterval =
interval.equals(Preconditions.checkNotNull(fullInterval, "fullInterval")) ?
null : fullInterval;
+ this.servers = servers;
}
@JsonCreator
static RichSegmentDescriptor fromJson(
@JsonProperty("fi") @Nullable final Interval fullInterval,
@JsonProperty("itvl") final Interval interval,
@JsonProperty("ver") final String version,
- @JsonProperty("part") final int partitionNumber
+ @JsonProperty("part") final int partitionNumber,
+ @JsonProperty("servers") final Set<DruidServerMetadata> servers,
+ @JsonProperty("isRealtime") final Boolean isRealtime
Review Comment:
## Useless parameter
The parameter 'isRealtime' is never used.
[Show more
details](https://github.com/apache/druid/security/code-scanning/5822)
--
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]