-
-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add support for the client spooling protocol #793
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
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
7854f9a
add new client protocol module
razvan 32dfb3a
update crd fields to match decision
razvan e732da4
add spooling config to STS and some unit tests
razvan cc24f64
add kuttl test
razvan 318c600
fix spool secret length
razvan 202e25f
integration test successful
razvan 9e2d738
rename python script
razvan d220ea4
Merge remote-tracking branch 'origin/main' into issues/673
razvan 9086f55
increase the number of rows to fetch from Trino
razvan 0a0c093
update changelog
razvan bea8115
update docs
razvan c5dc376
remove unused enum
razvan 8f58e0e
remove Optional from config_overrides
razvan 78f2e64
remove the "enabled" property
razvan e916710
refactor crd to use spec.clusterConfig.clientProtocol.spooling
razvan fffd646
remove clientProtocol.configOverrides field
razvan 9ceafd6
handle config overrides for spooling-manager.properties
razvan 206b5df
update docs
razvan 83f8879
use config-utils to resolve S3 credentials
razvan a020f50
add comment to function
razvan 26b5097
revert the unsafe function
razvan b63c9de
fix merge and update test
razvan efe1003
remove test timeout
razvan 9e55ce1
not all Trino versions support spooling
razvan da557fd
Apply suggestions from code review
razvan 76c88da
remove leftovers
razvan d76c4a1
remove `clusterConfig.faultTolerantExecution.configOverrides` property
razvan 0ba2fed
amend FTE changelog
razvan 4d32b6f
client_protocol: refactor s3 config into crd::s3 and config::s3 to m…
razvan d6943fc
fte: refactor to reuse crd::s3 anc move resolved struct out of the cr…
razvan c030c38
Apply suggestions from code review
razvan 6757b5e
remove unused imports after suggestion
razvan b5c1941
remove crd::s3 which included iam fields
razvan af0806b
fte tests: replace inline structs with indoc
razvan dc31a89
controller tests: apply PR review patch
razvan 68809f8
client-spooling: update schema for docs and tests
razvan f7f1e95
Apply suggestions from code review
razvan 2bd9cd4
Merge branch 'main' into issues/673
razvan 67945ba
client spooling: make s3 filesystem consistent with FTE backend
razvan 35e7f2c
ensure error message are lowercased
razvan ae1dc26
client spooling: raise error for trino 451
razvan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
docs/modules/trino/pages/usage-guide/client-spooling-protocol.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
= Client Spooling Protocol | ||
:description: Enable and configure the Client Spooling Protocol in Trino for efficient handling of large result sets. | ||
:keywords: client spooling protocol, Trino, large result sets, memory management | ||
:trino-docs-spooling-url: https://trino.io/docs/476/client/client-protocol.html | ||
|
||
The Client Spooling Protocol in Trino is designed to efficiently handle large result sets. When enabled, this protocol allows the Trino server to spool results to external storage systems, reducing memory consumption and improving performance for queries that return large datasets. | ||
|
||
For more details, refer to the link:{trino-docs-spooling-url}[Trino documentation on Client Spooling Protocol {external-link-icon}^]. | ||
|
||
[IMPORTANT] | ||
==== | ||
The client spooling protocol was introduced in Trino 466 but it only works reliably starting with Trino 476. | ||
==== | ||
|
||
== Configuration | ||
|
||
The client spooling protocol is disabled by default. | ||
To enable it, you need to set the `spec.clusterConfig.clientSpoolingProtocol` configuration property as shown below. | ||
|
||
[source,yaml] | ||
---- | ||
spec: | ||
clusterConfig: | ||
clientProtocol: | ||
spooling: | ||
location: "s3://spooling-bucket/trino/" # <1> | ||
filesystem: | ||
s3: # <2> | ||
connection: | ||
reference: "minio" | ||
---- | ||
<1> Specifies the location where spooled data will be stored. This example uses an S3 bucket. | ||
<2> Configures the filesystem type for spooling. Only S3 is supported currently via the custom resource definition. | ||
|
||
The operator automatically fills in additional settings required by Trino, such as the `protocol.spooling.shared-secret-key`. | ||
To add or replace properties in the generated `spooling-manager.properties` file, use the `configOverrides` property as describe here : xref:usage-guide/configuration.adoc[]. | ||
|
||
[IMPORTANT] | ||
==== | ||
Even if enabled, Trino may decide to not use the client spooling protocol for certain queries. Clients cannot force Trino to use it. | ||
==== | ||
|
||
The clients need to have access to the same storage location configured for spooling. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.