File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use std::{
2424 path:: { Path , PathBuf } ,
2525 process,
2626 sync:: { Arc , Mutex , RwLock } ,
27- time:: { SystemTime , UNIX_EPOCH } ,
27+ time:: { Instant , SystemTime , UNIX_EPOCH } ,
2828} ;
2929
3030use arrow_array:: RecordBatch ;
@@ -721,9 +721,23 @@ impl Stream {
721721
722722 /// First flushes arrows onto disk and then converts the arrow into parquet
723723 pub fn flush_and_convert ( & self , shutdown_signal : bool ) -> Result < ( ) , StagingError > {
724+ let start_flush = Instant :: now ( ) ;
724725 self . flush ( shutdown_signal) ;
726+ trace ! (
727+ "Flushing stream ({}) took: {}s" ,
728+ self . stream_name,
729+ start_flush. elapsed( ) . as_secs_f64( )
730+ ) ;
731+
732+ let start_convert = Instant :: now ( ) ;
733+ self . prepare_parquet ( shutdown_signal) ?;
734+ trace ! (
735+ "Converting arrows to parquet on stream ({}) took: {}s" ,
736+ self . stream_name,
737+ start_convert. elapsed( ) . as_secs_f64( )
738+ ) ;
725739
726- self . prepare_parquet ( shutdown_signal )
740+ Ok ( ( ) )
727741 }
728742}
729743
You can’t perform that action at this time.
0 commit comments