1- use crate :: channel_manager_ext:: set_channel_resolver ;
1+ use crate :: channel_manager_ext:: set_distributed_channel_resolver ;
22use crate :: config_extension_ext:: {
33 set_distributed_option_extension, set_distributed_option_extension_from_headers,
44} ;
5- use crate :: user_codec_ext:: set_user_codec ;
5+ use crate :: user_codec_ext:: set_distributed_user_codec ;
66use crate :: ChannelResolver ;
77use datafusion:: common:: DataFusionError ;
88use datafusion:: config:: ConfigExtension ;
@@ -151,20 +151,20 @@ pub trait DistributedExt: Sized {
151151 /// }
152152 /// }
153153 ///
154- /// let config = SessionConfig::new().with_user_codec (CustomExecCodec);
154+ /// let config = SessionConfig::new().with_distributed_user_codec (CustomExecCodec);
155155 ///
156156 /// async fn build_state(ctx: DistributedSessionBuilderContext) -> Result<SessionState, DataFusionError> {
157157 /// // while providing this MyCustomSessionBuilder to an Arrow Flight endpoint, it will
158158 /// // know how to deserialize the CustomExtension from the gRPC metadata.
159159 /// Ok(SessionStateBuilder::new()
160- /// .with_user_codec (CustomExecCodec)
160+ /// .with_distributed_user_codec (CustomExecCodec)
161161 /// .build())
162162 /// }
163163 /// ```
164- fn with_user_codec < T : PhysicalExtensionCodec + ' static > ( self , codec : T ) -> Self ;
164+ fn with_distributed_user_codec < T : PhysicalExtensionCodec + ' static > ( self , codec : T ) -> Self ;
165165
166- /// Same as [DistributedExt::with_user_codec ] but with an in-place mutation
167- fn set_user_codec < T : PhysicalExtensionCodec + ' static > ( & mut self , codec : T ) ;
166+ /// Same as [DistributedExt::with_distributed_user_codec ] but with an in-place mutation
167+ fn set_distributed_user_codec < T : PhysicalExtensionCodec + ' static > ( & mut self , codec : T ) ;
168168
169169 /// Injects a [ChannelResolver] implementation for Distributed DataFusion to resolve worker
170170 /// nodes. When running in distributed mode, setting a [ChannelResolver] is required.
@@ -192,21 +192,26 @@ pub trait DistributedExt: Sized {
192192 /// }
193193 /// }
194194 ///
195- /// let config = SessionConfig::new().with_channel_resolver (CustomChannelResolver);
195+ /// let config = SessionConfig::new().with_distributed_channel_resolver (CustomChannelResolver);
196196 ///
197197 /// async fn build_state(ctx: DistributedSessionBuilderContext) -> Result<SessionState, DataFusionError> {
198198 /// // while providing this MyCustomSessionBuilder to an Arrow Flight endpoint, it will
199199 /// // know how to deserialize the CustomExtension from the gRPC metadata.
200200 /// Ok(SessionStateBuilder::new()
201- /// .with_channel_resolver (CustomChannelResolver)
201+ /// .with_distributed_channel_resolver (CustomChannelResolver)
202202 /// .build())
203203 /// }
204204 /// ```
205- fn with_channel_resolver < T : ChannelResolver + Send + Sync + ' static > ( self , resolver : T )
206- -> Self ;
205+ fn with_distributed_channel_resolver < T : ChannelResolver + Send + Sync + ' static > (
206+ self ,
207+ resolver : T ,
208+ ) -> Self ;
207209
208- /// Same as [DistributedExt::with_channel_resolver] but with an in-place mutation.
209- fn set_channel_resolver < T : ChannelResolver + Send + Sync + ' static > ( & mut self , resolver : T ) ;
210+ /// Same as [DistributedExt::with_distributed_channel_resolver] but with an in-place mutation.
211+ fn set_distributed_channel_resolver < T : ChannelResolver + Send + Sync + ' static > (
212+ & mut self ,
213+ resolver : T ,
214+ ) ;
210215}
211216
212217impl DistributedExt for SessionConfig {
@@ -224,12 +229,15 @@ impl DistributedExt for SessionConfig {
224229 set_distributed_option_extension_from_headers :: < T > ( self , headers)
225230 }
226231
227- fn set_user_codec < T : PhysicalExtensionCodec + ' static > ( & mut self , codec : T ) {
228- set_user_codec ( self , codec)
232+ fn set_distributed_user_codec < T : PhysicalExtensionCodec + ' static > ( & mut self , codec : T ) {
233+ set_distributed_user_codec ( self , codec)
229234 }
230235
231- fn set_channel_resolver < T : ChannelResolver + Send + Sync + ' static > ( & mut self , resolver : T ) {
232- set_channel_resolver ( self , resolver)
236+ fn set_distributed_channel_resolver < T : ChannelResolver + Send + Sync + ' static > (
237+ & mut self ,
238+ resolver : T ,
239+ ) {
240+ set_distributed_channel_resolver ( self , resolver)
233241 }
234242
235243 delegate ! {
@@ -242,13 +250,13 @@ impl DistributedExt for SessionConfig {
242250 #[ expr( $?; Ok ( self ) ) ]
243251 fn with_distributed_option_extension_from_headers<T : ConfigExtension + Default >( mut self , headers: & HeaderMap ) -> Result <Self , DataFusionError >;
244252
245- #[ call( set_user_codec ) ]
253+ #[ call( set_distributed_user_codec ) ]
246254 #[ expr( $; self ) ]
247- fn with_user_codec <T : PhysicalExtensionCodec + ' static >( mut self , codec: T ) -> Self ;
255+ fn with_distributed_user_codec <T : PhysicalExtensionCodec + ' static >( mut self , codec: T ) -> Self ;
248256
249- #[ call( set_channel_resolver ) ]
257+ #[ call( set_distributed_channel_resolver ) ]
250258 #[ expr( $; self ) ]
251- fn with_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( mut self , resolver: T ) -> Self ;
259+ fn with_distributed_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( mut self , resolver: T ) -> Self ;
252260 }
253261 }
254262}
@@ -266,15 +274,15 @@ impl DistributedExt for SessionStateBuilder {
266274 #[ expr( $?; Ok ( self ) ) ]
267275 fn with_distributed_option_extension_from_headers<T : ConfigExtension + Default >( mut self , headers: & HeaderMap ) -> Result <Self , DataFusionError >;
268276
269- fn set_user_codec <T : PhysicalExtensionCodec + ' static >( & mut self , codec: T ) ;
270- #[ call( set_user_codec ) ]
277+ fn set_distributed_user_codec <T : PhysicalExtensionCodec + ' static >( & mut self , codec: T ) ;
278+ #[ call( set_distributed_user_codec ) ]
271279 #[ expr( $; self ) ]
272- fn with_user_codec <T : PhysicalExtensionCodec + ' static >( mut self , codec: T ) -> Self ;
280+ fn with_distributed_user_codec <T : PhysicalExtensionCodec + ' static >( mut self , codec: T ) -> Self ;
273281
274- fn set_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( & mut self , resolver: T ) ;
275- #[ call( set_channel_resolver ) ]
282+ fn set_distributed_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( & mut self , resolver: T ) ;
283+ #[ call( set_distributed_channel_resolver ) ]
276284 #[ expr( $; self ) ]
277- fn with_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( mut self , resolver: T ) -> Self ;
285+ fn with_distributed_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( mut self , resolver: T ) -> Self ;
278286 }
279287 }
280288}
@@ -292,15 +300,15 @@ impl DistributedExt for SessionState {
292300 #[ expr( $?; Ok ( self ) ) ]
293301 fn with_distributed_option_extension_from_headers<T : ConfigExtension + Default >( mut self , headers: & HeaderMap ) -> Result <Self , DataFusionError >;
294302
295- fn set_user_codec <T : PhysicalExtensionCodec + ' static >( & mut self , codec: T ) ;
296- #[ call( set_user_codec ) ]
303+ fn set_distributed_user_codec <T : PhysicalExtensionCodec + ' static >( & mut self , codec: T ) ;
304+ #[ call( set_distributed_user_codec ) ]
297305 #[ expr( $; self ) ]
298- fn with_user_codec <T : PhysicalExtensionCodec + ' static >( mut self , codec: T ) -> Self ;
306+ fn with_distributed_user_codec <T : PhysicalExtensionCodec + ' static >( mut self , codec: T ) -> Self ;
299307
300- fn set_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( & mut self , resolver: T ) ;
301- #[ call( set_channel_resolver ) ]
308+ fn set_distributed_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( & mut self , resolver: T ) ;
309+ #[ call( set_distributed_channel_resolver ) ]
302310 #[ expr( $; self ) ]
303- fn with_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( mut self , resolver: T ) -> Self ;
311+ fn with_distributed_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( mut self , resolver: T ) -> Self ;
304312 }
305313 }
306314}
@@ -318,15 +326,15 @@ impl DistributedExt for SessionContext {
318326 #[ expr( $?; Ok ( self ) ) ]
319327 fn with_distributed_option_extension_from_headers<T : ConfigExtension + Default >( self , headers: & HeaderMap ) -> Result <Self , DataFusionError >;
320328
321- fn set_user_codec <T : PhysicalExtensionCodec + ' static >( & mut self , codec: T ) ;
322- #[ call( set_user_codec ) ]
329+ fn set_distributed_user_codec <T : PhysicalExtensionCodec + ' static >( & mut self , codec: T ) ;
330+ #[ call( set_distributed_user_codec ) ]
323331 #[ expr( $; self ) ]
324- fn with_user_codec <T : PhysicalExtensionCodec + ' static >( self , codec: T ) -> Self ;
332+ fn with_distributed_user_codec <T : PhysicalExtensionCodec + ' static >( self , codec: T ) -> Self ;
325333
326- fn set_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( & mut self , resolver: T ) ;
327- #[ call( set_channel_resolver ) ]
334+ fn set_distributed_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( & mut self , resolver: T ) ;
335+ #[ call( set_distributed_channel_resolver ) ]
328336 #[ expr( $; self ) ]
329- fn with_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( self , resolver: T ) -> Self ;
337+ fn with_distributed_channel_resolver <T : ChannelResolver + Send + Sync + ' static >( self , resolver: T ) -> Self ;
330338 }
331339 }
332340}
0 commit comments