-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve and expand client protocol docs
Include the new spooling protocol and its configuration for CLI and JDBC driver.
- Loading branch information
Showing
10 changed files
with
371 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
183 changes: 183 additions & 0 deletions
183
docs/src/main/sphinx/admin/properties-client-protocol.md
This file contains 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,183 @@ | ||
# Client protocol properties | ||
|
||
The following sections provide a reference for all properties related to the | ||
[client protocol](/client/client-protocol). | ||
|
||
(prop-protocol-spooling)= | ||
## Spooling protocol | ||
|
||
The following properties are related to the [](protocol-spooling). | ||
|
||
### `protocol.spooling.enabled` | ||
|
||
- **Type:** [](prop-type-boolean) | ||
- **Default value:** `true` (is that automatically configured if shares secret or so is set up) | ||
|
||
Enable spooled client protocol support. | ||
|
||
### `protocol.spooling.shared-secret-key` | ||
|
||
- **Type:** [](prop-type-string) | ||
|
||
256 bit, base64-encoded secret key used to secure segment identifiers. | ||
|
||
### `protocol.spooling.retrieval-mode` | ||
|
||
- **Type:** [](prop-type-string) | ||
- **Default value:** `STORAGE` | ||
|
||
Determines how the client retrieves the segment. Following are possible values: | ||
|
||
* `STORAGE` - client accesses the storage directly with the pre-signed URI, 1 | ||
round trip | ||
* `COORDINATOR_STORAGE_REDIRECT` - client accesses the coordinator and is | ||
redirected to the storage with the pre-signed URI, 2 round trips | ||
* `COORDINATOR_PROXY` - client accesses the coordinator and gets segment data | ||
through it, 1 round trip per segment | ||
* `WORKER_PROXY` - tbd | ||
|
||
### `protocol.spooling.initial-segment-size` | ||
|
||
- **Type:** [](prop-type-data-size) | ||
- **Default value:** 8MB | ||
|
||
Initial size of the spooled segments. | ||
|
||
### `protocol.spooling.maximum-segment-size` | ||
|
||
- **Type:** [](prop-type-data-size) | ||
- **Default value:** 16MB | ||
|
||
Maximum size per segment. | ||
|
||
### `protocol.spooling.inlining.enabled` | ||
|
||
- **Type:** [](prop-type-boolean) | ||
- **Default value:** `true` | ||
|
||
Allow spooled protocol to inline data. | ||
|
||
|
||
### `protocol.spooling.inlining.max-rows` | ||
|
||
- **Type:** [](prop-type-integer) | ||
- **Default value:** 1000 | ||
|
||
Maximum number of rows that are allowed to be inlined per worker. | ||
|
||
|
||
### `protocol.spooling.inlining.max-size` | ||
|
||
- **Type:** [](prop-type-data-size) | ||
- **Default value:** 128kB | ||
|
||
Maximum size of rows that are allowed to be inlined per worker. | ||
|
||
(prop-spooling-filesystem)= | ||
## Spooling filesystem | ||
|
||
The following properties are used to configure the object storage used with the | ||
[](protocol-spooling). | ||
|
||
### `fs.azure.enabled` | ||
|
||
- **Type:** [](prop-type-boolean) | ||
- **Default value:** `false` | ||
|
||
Enable Azure Sotobject storage for more details, exclusive to other | ||
|
||
|
||
### `fs.s3.enabled` | ||
|
||
- **Type:** [](prop-type-boolean) | ||
- **Default value:** `false` | ||
|
||
### `fs.gcs.enabled` | ||
|
||
- **Type:** [](prop-type-boolean) | ||
- **Default value:** `false` | ||
|
||
### `fs.location` | ||
|
||
- **Type:** | ||
|
||
similar to https://trino.io/docs/current/connector/delta-lake.html#register-table | ||
|
||
location with some schema | ||
|
||
### `fs.layout` | ||
|
||
- **Type:** | ||
|
||
layout class, some sort of `SIMPLE` or `PARTITIONED` | ||
|
||
Spooling segments file system layout | ||
|
||
|
||
|
||
|
||
### `fs.segment.ttl` | ||
|
||
- **Type:** [](prop-type-duration) | ||
|
||
Maximum duration for the client to retrieve spooled segment before it expires | ||
|
||
### `fs.segment.direct.ttl` | ||
|
||
- **Type:** [](prop-type-duration) | ||
|
||
Maximum duration for the client to retrieve spooled segment from the direct URI | ||
|
||
### `fs.segment.encryption` | ||
|
||
- **Type:** | ||
|
||
Encrypt segments with ephemeral keys | ||
|
||
### `fs.segment.explicit-ack` | ||
|
||
Enables deletion of segments on client acknowledgment. | ||
|
||
### `fs.segment.pruning.enabled` | ||
|
||
- **Type:** | ||
|
||
Prune expired segments periodically | ||
|
||
### `fs.segment.pruning.interval` | ||
|
||
- **Type:** | ||
|
||
Interval to prune expired segments | ||
|
||
### `fs.segment.pruning.batch-size` | ||
|
||
- **Type:** | ||
|
||
Prune expired segments in batches of provided size | ||
|
||
|
||
(prop-protocol-v1)= | ||
## v1 protocol | ||
|
||
The following properties are related to the [](protocol-direct). | ||
|
||
### `protocol.v1.prepared-statement-compression.length-threshold` | ||
|
||
- **Type:** [](prop-type-integer) | ||
- **Default value:** `2048` | ||
|
||
Prepared statements that are submitted to Trino for processing, and are longer | ||
than the value of this property, are compressed for transport via the HTTP | ||
header to improve handling, and to avoid failures due to hitting HTTP header | ||
size limits. | ||
|
||
### `protocol.v1.prepared-statement-compression.min-gain` | ||
|
||
- **Type:** [](prop-type-integer) | ||
- **Default value:** `512` | ||
|
||
Prepared statement compression is not applied if the size gain is less than the | ||
configured value. Smaller statements do not benefit from compression, and are | ||
left uncompressed. | ||
|
This file contains 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 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 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 |
---|---|---|
@@ -1,27 +1,50 @@ | ||
# Clients | ||
|
||
A [client](trino-concept-client) is used to send queries to Trino and receive | ||
results, or otherwise interact with Trino and the connected data sources. | ||
A [client](trino-concept-client) is used to send SQL queries to Trino, and | ||
therefore any [connected data sources](trino-concept-data-source), and receive | ||
results. | ||
|
||
Some clients, such as the [command line interface](/client/cli), can provide a | ||
user interface directly. Clients like the [JDBC driver](/client/jdbc), provide a | ||
mechanism for other applications, including your own custom applications, to | ||
connect to Trino. | ||
## Client drivers | ||
|
||
The following clients are available as part of every Trino release: | ||
Client drivers, also called client libraries, provide a mechanism for other | ||
applications to connect to Trino. The application are called client application | ||
and include your own custom applications or scripts. The Trino project maintains the | ||
following client drivers: | ||
|
||
* [Trino JDBC driver](/client/jdbc) | ||
* [trino-go-client](https://github.com/trinodb/trino-go-client) | ||
* [trino-js-client](https://github.com/trinodb/trino-js-client) | ||
* [trino-python-client](https://github.com/trinodb/trino-python-client) | ||
|
||
Other communities and vendors provide [other client | ||
drivers](https://trino.io/ecosystem/client.html). | ||
|
||
## Client applications | ||
|
||
Client applications provide a user interface and other user-facing features to | ||
run queries with Trino. You can inspect the results, perform analytics with | ||
further queries, and create visualizations. Client applications typically use a | ||
client driver. | ||
|
||
The Trino project maintains the [Trino command line interface](/client/cli) as a | ||
client application. | ||
|
||
Other communities and vendors provide [numerous other client | ||
applications](https://trino.io/ecosystem/client.html) | ||
|
||
## Client protocol | ||
|
||
All client drivers and client applications communicate with the Trino | ||
coordinator using the [client protocol](/client/client-protocol). | ||
|
||
Configure support for the [spooling protocol](protocol-spooling) on the cluster | ||
to improve performance for client interactions with higher data transfer | ||
demands. | ||
|
||
```{toctree} | ||
:maxdepth: 1 | ||
client/client-protocol | ||
client/cli | ||
client/jdbc | ||
``` | ||
|
||
The Trino project maintains the following other client libraries: | ||
|
||
* [trino-go-client](https://github.com/trinodb/trino-go-client) | ||
* [trino-js-client](https://github.com/trinodb/trino-js-client) | ||
* [trino-python-client](https://github.com/trinodb/trino-python-client) | ||
|
||
In addition, other communities and vendors provide [numerous other client | ||
libraries, drivers, and applications](https://trino.io/ecosystem/client) |
This file contains 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.