@@ -30,6 +30,7 @@ use crate::{
3030pub enum FaultTolerantExecutionConfig {
3131 /// Query-level fault tolerant execution. Retries entire queries on failure.
3232 Query ( QueryRetryConfig ) ,
33+
3334 /// Task-level fault tolerant execution. Retries individual tasks on failure (requires exchange manager).
3435 Task ( TaskRetryConfig ) ,
3536}
@@ -131,8 +132,10 @@ pub struct ExchangeManagerConfig {
131132pub enum ExchangeManagerBackend {
132133 /// S3-compatible storage configuration.
133134 S3 ( S3ExchangeConfig ) ,
135+
134136 /// HDFS-based exchange manager.
135137 Hdfs ( HdfsExchangeConfig ) ,
138+
136139 /// Local filesystem storage (not recommended for production).
137140 Local ( LocalExchangeConfig ) ,
138141}
@@ -142,18 +145,23 @@ pub enum ExchangeManagerBackend {
142145pub struct S3ExchangeConfig {
143146 /// S3 bucket URIs for spooling data (e.g., s3://bucket1,s3://bucket2).
144147 pub base_directories : Vec < String > ,
148+
145149 /// S3 connection configuration.
146150 /// Learn more about S3 configuration in the [S3 concept docs](DOCS_BASE_URL_PLACEHOLDER/concepts/s3).
147151 pub connection : stackable_operator:: crd:: s3:: v1alpha1:: InlineConnectionOrReference ,
152+
148153 /// IAM role to assume for S3 access.
149154 #[ serde( skip_serializing_if = "Option::is_none" ) ]
150155 pub iam_role : Option < String > ,
156+
151157 /// External ID for the IAM role trust policy.
152158 #[ serde( skip_serializing_if = "Option::is_none" ) ]
153159 pub external_id : Option < String > ,
160+
154161 /// Maximum number of times the S3 client should retry a request.
155162 #[ serde( skip_serializing_if = "Option::is_none" ) ]
156163 pub max_error_retries : Option < u32 > ,
164+
157165 /// Part data size for S3 multi-part upload.
158166 #[ serde( skip_serializing_if = "Option::is_none" ) ]
159167 pub upload_part_size : Option < String > ,
@@ -164,11 +172,14 @@ pub struct S3ExchangeConfig {
164172pub struct HdfsExchangeConfig {
165173 /// HDFS URIs for spooling data.
166174 pub base_directories : Vec < String > ,
175+
167176 /// HDFS connection configuration.
168177 pub hdfs : HdfsConnection ,
178+
169179 /// Block data size for HDFS storage.
170180 #[ serde( skip_serializing_if = "Option::is_none" ) ]
171181 pub block_size : Option < String > ,
182+
172183 /// Skip directory scheme validation to support Hadoop-compatible file systems.
173184 #[ serde( skip_serializing_if = "Option::is_none" ) ]
174185 pub skip_directory_scheme_validation : Option < bool > ,
@@ -196,15 +207,20 @@ pub enum Error {
196207pub struct ResolvedFaultTolerantExecutionConfig {
197208 /// Properties to add to config.properties
198209 pub config_properties : BTreeMap < String , String > ,
210+
199211 /// Properties to add to exchange-manager.properties (if needed)
200212 pub exchange_manager_properties : BTreeMap < String , String > ,
213+
201214 /// Volumes required for the configuration (e.g., for S3 credentials)
202215 pub volumes : Vec < Volume > ,
216+
203217 /// Volume mounts required for the configuration
204218 pub volume_mounts : Vec < VolumeMount > ,
219+
205220 /// Env-Vars that should be exported from files.
206221 /// You can think of it like `export <key>="$(cat <value>)"`
207222 pub load_env_from_files : BTreeMap < String , String > ,
223+
208224 /// Additional commands that need to be executed before starting Trino
209225 pub init_container_extra_start_commands : Vec < String > ,
210226}
0 commit comments