abhishekrb19 commented on code in PR #18148:
URL: https://github.com/apache/druid/pull/18148#discussion_r2403631582
##########
processing/src/main/java/org/apache/druid/query/QueryContext.java:
##########
@@ -545,6 +544,32 @@ public void verifyMaxQueryTimeout(long maxQueryTimeout)
}
}
+ public long getPerSegmentTimeout()
+ {
+ return getPerSegmentTimeout(QueryContexts.NO_TIMEOUT);
+ }
+
+ public long getPerSegmentTimeout(long defaultTimeout)
+ {
+ final long timeout = getLong(QueryContexts.PER_SEGMENT_TIMEOUT_KEY,
defaultTimeout);
+ if (timeout >= 0) {
+ return timeout;
+ }
+
+ throw new BadQueryContextException(
+ StringUtils.format(
+ "Per-segment timeout [%s] must be a non negative value, but was
%d",
+ QueryContexts.PER_SEGMENT_TIMEOUT_KEY,
+ timeout
+ )
+ );
+ }
+
+ public boolean usePerSegmentTimeout()
+ {
+ return getPerSegmentTimeout() != QueryContexts.NO_TIMEOUT;
Review Comment:
can this be set at the cluster level similar to the existing `timeout`
parameter that will broadly apply to all queries?
--
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]