hfutatzhanghb opened a new pull request, #7815:
URL: https://github.com/apache/opendal/pull/7815

   # Which issue does this PR close?
   
   N/A.
   
   # Rationale for this change
   
   HDFS users may need rename to fail when the target file already exists 
instead of overwriting it. This change keeps OpenDAL's default rename behavior 
unchanged while allowing the HDFS backend to opt into an `AlreadyExists` error 
through configuration.
   
   # What changes are included in this PR?
   
   - Add `rename_overwrite` to `HdfsConfig` and `HdfsBuilder`, defaulting to 
`true`.
   - Apply the setting in HDFS rename target handling so `false` returns 
`ErrorKind::AlreadyExists` without deleting the existing target file.
   - Document the HDFS-specific rename behavior and add focused unit tests.
   - Update the HDFS docs example runtime flavor so HDFS doc tests compile with 
the crate's enabled Tokio features.
   
   # Are there any user-facing changes?
   
   Yes. HDFS users can configure `rename_overwrite(false)` or `rename_overwrite 
= false` to make rename fail with `AlreadyExists` when the target file exists. 
The default HDFS behavior remains unchanged and continues to overwrite existing 
target files.
   
   # AI Usage Statement
   
   AI assistance was used to prepare this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to