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::{
66
66
LogStream , ARROW_FILE_EXTENSION ,
67
67
} ;
68
68
69
+ const INPROCESS_DIR_PREFIX : & str = "processing_" ;
70
+
69
71
/// Returns the filename for parquet if provided arrows file path is valid as per our expectation
70
72
fn arrow_path_to_parquet (
71
73
stream_staging_path : & Path ,
@@ -228,7 +230,12 @@ impl Stream {
228
230
//iterate through all the inprocess_ directories and collect all arrow files
229
231
dir. filter_map ( |entry| {
230
232
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
+ {
232
239
Some ( path)
233
240
} else {
234
241
None
@@ -399,7 +406,7 @@ impl Stream {
399
406
}
400
407
401
408
fn inprocess_folder ( base : & Path , minute : u128 ) -> PathBuf {
402
- base. join ( format ! ( "inprocess_{}" , minute) )
409
+ base. join ( format ! ( "{INPROCESS_DIR_PREFIX}{ minute}" ) )
403
410
}
404
411
405
412
pub fn parquet_files ( & self ) -> Vec < PathBuf > {
You can’t perform that action at this time.
0 commit comments