-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add maxBytesInMemory and maxClientResponseBytes to SamplerConfig #12947
Conversation
@JsonProperty("timeoutMs") Integer timeoutMs | ||
@JsonProperty("numRows") @Nullable Integer numRows, | ||
@JsonProperty("timeoutMs") @Nullable Integer timeoutMs, | ||
@JsonProperty("maxBytesInMemory") @Nullable Long maxBytesInMemory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JsonProperty("maxBytesInMemory") @Nullable Long maxBytesInMemory, | |
@JsonProperty("maxBytesInMemory") @Nullable HumanReadableBytes maxBytesInMemory, |
@JsonProperty("numRows") @Nullable Integer numRows, | ||
@JsonProperty("timeoutMs") @Nullable Integer timeoutMs, | ||
@JsonProperty("maxBytesInMemory") @Nullable Long maxBytesInMemory, | ||
@JsonProperty("maxClientResponseBytes") @Nullable Long maxClientResponseBytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JsonProperty("maxClientResponseBytes") @Nullable Long maxClientResponseBytes | |
@JsonProperty("maxClientResponseBytes") @Nullable HumanReadableBytes maxClientResponseBytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that seems reasonable, forgot about that thing 👍
@@ -253,6 +253,7 @@ public void applyDataSegmentChangeRequests( | |||
|
|||
final AsyncContext asyncContext = req.startAsync(); | |||
|
|||
|
|||
asyncContext.addListener( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accidental change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor comments
Description
Adds additional limits
maxBytesInMemory
andmaxClientResponseBytes
to the Druid sampler API config, to augment existing options ofnumRows
andtimeoutMs
. While these two configs are quite similar,maxBytesInMemory
is oriented around controlling how big theIncrementalIndex
which performs the sampling will be, whilemaxClientResponseBytes
is an attempt to allow clients to specify the maximum size of response they would prefer to handle, which might vary significantly frommaxBytesInMemory
.maxClientResponseBytes
is done in a rather sad way of serializing (and throwing away) the sampler rows and counting the bytes. In the future we might want to rework the sampler API to be a streaming API and do the counting of this stuff and enforcement of limits a bit more naturally.This PR has: