File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ use super::{
6666 LogStream , ARROW_FILE_EXTENSION ,
6767} ;
6868
69+ const INPROCESS_DIR_PREFIX : & str = "processing_" ;
70+
6971/// Returns the filename for parquet if provided arrows file path is valid as per our expectation
7072fn arrow_path_to_parquet (
7173 stream_staging_path : & Path ,
@@ -228,7 +230,12 @@ impl Stream {
228230 //iterate through all the inprocess_ directories and collect all arrow files
229231 dir. filter_map ( |entry| {
230232 let path = entry. ok ( ) ?. path ( ) ;
231- if path. is_dir ( ) && path. file_name ( ) ?. to_str ( ) ?. starts_with ( "inprocess_" ) {
233+ if path. is_dir ( )
234+ && path
235+ . file_name ( ) ?
236+ . to_str ( ) ?
237+ . starts_with ( INPROCESS_DIR_PREFIX )
238+ {
232239 Some ( path)
233240 } else {
234241 None
@@ -399,7 +406,7 @@ impl Stream {
399406 }
400407
401408 fn inprocess_folder ( base : & Path , minute : u128 ) -> PathBuf {
402- base. join ( format ! ( "inprocess_{}" , minute) )
409+ base. join ( format ! ( "{INPROCESS_DIR_PREFIX}{ minute}" ) )
403410 }
404411
405412 pub fn parquet_files ( & self ) -> Vec < PathBuf > {
You can’t perform that action at this time.
0 commit comments