@@ -26,9 +26,9 @@ use std::sync::Arc;
2626use async_trait:: async_trait;
2727use bytes:: Bytes ;
2828use chrono:: { DateTime , Utc } ;
29+ use fs_hdfs:: hdfs:: { get_hdfs_by_full_path, FileStatus , HdfsErr , HdfsFile , HdfsFs } ;
30+ use fs_hdfs:: walkdir:: HdfsWalkDir ;
2931use futures:: { stream:: BoxStream , StreamExt , TryStreamExt } ;
30- use hdfs:: hdfs:: { get_hdfs_by_full_path, FileStatus , HdfsErr , HdfsFile , HdfsFs } ;
31- use hdfs:: walkdir:: HdfsWalkDir ;
3232use object_store:: {
3333 path:: { self , Path } ,
3434 Error , GetOptions , GetRange , GetResult , GetResultPayload , ListResult , MultipartUpload ,
@@ -422,7 +422,7 @@ impl ObjectStore for HadoopFileSystem {
422422 hdfs. delete ( & to, false ) . map_err ( to_error) ?;
423423 }
424424
425- hdfs :: util:: HdfsUtil :: copy ( hdfs. as_ref ( ) , & from, hdfs. as_ref ( ) , & to)
425+ fs_hdfs :: util:: HdfsUtil :: copy ( hdfs. as_ref ( ) , & from, hdfs. as_ref ( ) , & to)
426426 . map_err ( to_error) ?;
427427
428428 Ok ( ( ) )
@@ -437,7 +437,7 @@ impl ObjectStore for HadoopFileSystem {
437437 let to = HadoopFileSystem :: path_to_filesystem ( to) ;
438438
439439 maybe_spawn_blocking ( move || {
440- hdfs. rename ( & from, & to) . map_err ( to_error) ?;
440+ hdfs. rename ( & from, & to, true ) . map_err ( to_error) ?;
441441
442442 Ok ( ( ) )
443443 } )
@@ -459,7 +459,7 @@ impl ObjectStore for HadoopFileSystem {
459459 } ) ;
460460 }
461461
462- hdfs :: util:: HdfsUtil :: copy ( hdfs. as_ref ( ) , & from, hdfs. as_ref ( ) , & to)
462+ fs_hdfs :: util:: HdfsUtil :: copy ( hdfs. as_ref ( ) , & from, hdfs. as_ref ( ) , & to)
463463 . map_err ( to_error) ?;
464464
465465 Ok ( ( ) )
0 commit comments