@@ -163,6 +163,7 @@ impl ExecutionPlan for ShuffleReaderExec {
163163 let force_remote_read = config. ballista_shuffle_reader_force_remote_read ( ) ;
164164 let prefer_flight = config. ballista_shuffle_reader_remote_prefer_flight ( ) ;
165165 let customize_endpoint = config. ballista_override_create_grpc_client_endpoint ( ) ;
166+ let use_tls = config. ballista_use_tls ( ) ;
166167
167168 if force_remote_read {
168169 debug ! (
@@ -197,6 +198,7 @@ impl ExecutionPlan for ShuffleReaderExec {
197198 force_remote_read,
198199 prefer_flight,
199200 customize_endpoint,
201+ use_tls,
200202 ) ;
201203
202204 let result = RecordBatchStreamAdapter :: new (
@@ -392,6 +394,7 @@ fn send_fetch_partitions(
392394 force_remote_read : bool ,
393395 flight_transport : bool ,
394396 customize_endpoint : Option < Arc < BallistaConfigGrpcEndpoint > > ,
397+ use_tls : bool ,
395398) -> AbortableReceiverStream {
396399 let ( response_sender, response_receiver) = mpsc:: channel ( max_request_num) ;
397400 let semaphore = Arc :: new ( Semaphore :: new ( max_request_num) ) ;
@@ -417,6 +420,7 @@ fn send_fetch_partitions(
417420 max_message_size,
418421 flight_transport,
419422 customize_endpoint_c. clone ( ) ,
423+ use_tls,
420424 )
421425 . await ;
422426 if let Err ( e) = response_sender_c. send ( r) . await {
@@ -438,6 +442,7 @@ fn send_fetch_partitions(
438442 max_message_size,
439443 flight_transport,
440444 customize_endpoint_c,
445+ use_tls,
441446 )
442447 . await ;
443448 // Block if the channel buffer is full.
@@ -466,6 +471,7 @@ trait PartitionReader: Send + Sync + Clone {
466471 max_message_size : usize ,
467472 flight_transport : bool ,
468473 customize_endpoint : Option < Arc < BallistaConfigGrpcEndpoint > > ,
474+ use_tls : bool ,
469475 ) -> result:: Result < SendableRecordBatchStream , BallistaError > ;
470476}
471477
@@ -486,6 +492,7 @@ impl PartitionReader for PartitionReaderEnum {
486492 max_message_size : usize ,
487493 flight_transport : bool ,
488494 customize_endpoint : Option < Arc < BallistaConfigGrpcEndpoint > > ,
495+ use_tls : bool ,
489496 ) -> result:: Result < SendableRecordBatchStream , BallistaError > {
490497 match self {
491498 PartitionReaderEnum :: FlightRemote => {
@@ -494,6 +501,7 @@ impl PartitionReader for PartitionReaderEnum {
494501 max_message_size,
495502 flight_transport,
496503 customize_endpoint,
504+ use_tls,
497505 )
498506 . await
499507 }
@@ -510,6 +518,7 @@ async fn fetch_partition_remote(
510518 max_message_size : usize ,
511519 flight_transport : bool ,
512520 customize_endpoint : Option < Arc < BallistaConfigGrpcEndpoint > > ,
521+ use_tls : bool ,
513522) -> result:: Result < SendableRecordBatchStream , BallistaError > {
514523 let metadata = & location. executor_meta ;
515524 let partition_id = & location. partition_id ;
@@ -521,7 +530,7 @@ async fn fetch_partition_remote(
521530 host,
522531 port,
523532 max_message_size,
524- metadata . use_tls ,
533+ use_tls,
525534 customize_endpoint,
526535 )
527536 . await
@@ -696,7 +705,6 @@ mod tests {
696705 port : 7070 ,
697706 grpc_port : 8080 ,
698707 specification : ExecutorSpecification { task_slots : 1 } ,
699- use_tls : false ,
700708 } ,
701709 partition_stats : PartitionStats {
702710 num_rows : Some ( 1 ) ,
@@ -746,7 +754,6 @@ mod tests {
746754 port : 7070 ,
747755 grpc_port : 8080 ,
748756 specification : ExecutorSpecification { task_slots : 1 } ,
749- use_tls : false ,
750757 } ,
751758 partition_stats : PartitionStats {
752759 num_rows : Some ( 1 ) ,
@@ -797,7 +804,6 @@ mod tests {
797804 port : 7070 ,
798805 grpc_port : 8080 ,
799806 specification : ExecutorSpecification { task_slots : 1 } ,
800- use_tls : false ,
801807 } ,
802808 partition_stats : PartitionStats {
803809 num_rows : Some ( 1 ) ,
@@ -848,7 +854,6 @@ mod tests {
848854 port : 7070 ,
849855 grpc_port : 8080 ,
850856 specification : ExecutorSpecification { task_slots : 1 } ,
851- use_tls : false ,
852857 } ,
853858 partition_stats : Default :: default ( ) ,
854859 path : "test_path" . to_string ( ) ,
@@ -985,6 +990,7 @@ mod tests {
985990 false ,
986991 true ,
987992 None ,
993+ false ,
988994 ) ;
989995
990996 let stream = RecordBatchStreamAdapter :: new (
@@ -1011,7 +1017,6 @@ mod tests {
10111017 port : 50051 ,
10121018 grpc_port : 50052 ,
10131019 specification : ExecutorSpecification { task_slots : 12 } ,
1014- use_tls : false ,
10151020 } ,
10161021 partition_stats : Default :: default ( ) ,
10171022 path : path. clone ( ) ,
0 commit comments