1- use crate :: execution:: shuffle:: repartitioners:: ShufflePartitioner ;
2- use crate :: execution:: shuffle:: shuffle_writer:: {
3- BufBatchWriter , PartitionWriter , PartitionedBatchIterator , PartitionedBatchesProducer ,
4- ShuffleRepartitionerMetrics ,
1+ use crate :: execution:: shuffle:: metrics:: ShuffleRepartitionerMetrics ;
2+ use crate :: execution:: shuffle:: partitioners:: {
3+ PartitionedBatchIterator , PartitionedBatchesProducer , ShufflePartitioner ,
54} ;
5+ use crate :: execution:: shuffle:: writers:: { BufBatchWriter , PartitionWriter } ;
66use crate :: execution:: shuffle:: {
77 shuffle_writer, CometPartitioning , CompressionCodec , ShuffleBlockWriter ,
88} ;
@@ -24,7 +24,7 @@ use std::sync::Arc;
2424use tokio:: time:: Instant ;
2525
2626/// A partitioner that uses a hash function to partition data into multiple partitions
27- pub ( crate ) struct MultiPartitionShuffleRepartitioner {
27+ pub ( crate ) struct MultiPartitionShufflePartitioner {
2828 output_data_file : String ,
2929 output_index_file : String ,
3030 buffered_batches : Vec < RecordBatch > ,
@@ -62,7 +62,7 @@ struct ScratchSpace {
6262 partition_starts : Vec < u32 > ,
6363}
6464
65- impl MultiPartitionShuffleRepartitioner {
65+ impl MultiPartitionShufflePartitioner {
6666 #[ allow( clippy:: too_many_arguments) ]
6767 pub ( crate ) fn try_new (
6868 partition : usize ,
@@ -509,14 +509,14 @@ impl MultiPartitionShuffleRepartitioner {
509509}
510510
511511#[ cfg( test) ]
512- impl MultiPartitionShuffleRepartitioner {
512+ impl MultiPartitionShufflePartitioner {
513513 pub ( crate ) fn partition_writers ( & self ) -> & [ PartitionWriter ] {
514514 & self . partition_writers
515515 }
516516}
517517
518518#[ async_trait:: async_trait]
519- impl ShufflePartitioner for MultiPartitionShuffleRepartitioner {
519+ impl ShufflePartitioner for MultiPartitionShufflePartitioner {
520520 /// Shuffles rows in input batch into corresponding partition buffer.
521521 /// This function will slice input batch according to configured batch size and then
522522 /// shuffle rows into corresponding partition buffer.
@@ -567,10 +567,9 @@ impl ShufflePartitioner for MultiPartitionShuffleRepartitioner {
567567
568568 // if we wrote a spill file for this partition then copy the
569569 // contents into the shuffle file
570- if let Some ( spill_data) = self . partition_writers [ i] . spill_file . as_ref ( ) {
570+ if let Some ( spill_data) = self . partition_writers [ i] . spill_file ( ) {
571571 let mut spill_file = BufReader :: new (
572- File :: open ( spill_data. temp_file . path ( ) )
573- . map_err ( shuffle_writer:: to_df_err) ?,
572+ File :: open ( spill_data. path ( ) ) . map_err ( shuffle_writer:: to_df_err) ?,
574573 ) ;
575574 let mut write_timer = self . metrics . write_time . timer ( ) ;
576575 std:: io:: copy ( & mut spill_file, & mut output_data)
@@ -622,7 +621,7 @@ impl ShufflePartitioner for MultiPartitionShuffleRepartitioner {
622621 }
623622}
624623
625- impl Debug for MultiPartitionShuffleRepartitioner {
624+ impl Debug for MultiPartitionShufflePartitioner {
626625 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
627626 f. debug_struct ( "ShuffleRepartitioner" )
628627 . field ( "memory_used" , & self . used ( ) )
0 commit comments