jtuglu1 commented on code in PR #19486:
URL: https://github.com/apache/druid/pull/19486#discussion_r3277996830
##########
processing/src/main/java/org/apache/druid/query/QueryContexts.java:
##########
@@ -233,6 +244,39 @@ public String toString()
}
}
+ /**
+ * Classifies segments by whether a historical replica exists
+ * (see {@link
org.apache.druid.client.selector.ServerSelector#isRealtimeSegment()}: a segment
is
+ * "realtime" only when it has realtime servers and zero historical servers).
+ */
+ public enum RealtimeSegmentsMode
+ {
+ /** Include all segments (default). */
+ INCLUDE,
+ /** Include only segments served solely by realtime servers; any segment
with a historical replica
+ * (including segments mid-handoff) is excluded. */
+ EXCLUSIVE,
+ /** Exclude segments served solely by realtime servers; segments
mid-handoff with both realtime
+ * and historical replicas are still included. */
+ EXCLUDE;
+
+ @JsonCreator
+ public static RealtimeSegmentsMode fromString(String str)
+ {
+ if (str == null) {
+ return null;
+ }
+ return RealtimeSegmentsMode.valueOf(StringUtils.toUpperCase(str));
+ }
+
+ @Override
+ @JsonValue
+ public String toString()
+ {
+ return StringUtils.toLowerCase(name());
Review Comment:
I want to keep this lowercase as it's more inline with the docs and prior
query context enum values.
--
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]