File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -478,10 +478,9 @@ impl Stream {
478
478
479
479
for file in & arrow_files {
480
480
let file_size = file. metadata ( ) . unwrap ( ) . len ( ) ;
481
- let file_type = file. extension ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
482
481
483
482
metrics:: STORAGE_SIZE
484
- . with_label_values ( & [ "staging" , & self . stream_name , file_type ] )
483
+ . with_label_values ( & [ "staging" , & self . stream_name , ARROW_FILE_EXTENSION ] )
485
484
. add ( file_size as i64 ) ;
486
485
}
487
486
@@ -523,13 +522,12 @@ impl Stream {
523
522
for file in arrow_files {
524
523
// warn!("file-\n{file:?}\n");
525
524
let file_size = file. metadata ( ) . unwrap ( ) . len ( ) ;
526
- let file_type = file. extension ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
527
525
if remove_file ( file. clone ( ) ) . is_err ( ) {
528
526
error ! ( "Failed to delete file. Unstable state" ) ;
529
527
process:: abort ( )
530
528
}
531
529
metrics:: STORAGE_SIZE
532
- . with_label_values ( & [ "staging" , & self . stream_name , file_type ] )
530
+ . with_label_values ( & [ "staging" , & self . stream_name , ARROW_FILE_EXTENSION ] )
533
531
. sub ( file_size as i64 ) ;
534
532
}
535
533
}
You can’t perform that action at this time.
0 commit comments