hfutatzhanghb commented on code in PR #7815:
URL: https://github.com/apache/opendal/pull/7815#discussion_r3457286698
##########
core/services/hdfs/src/config.rs:
##########
@@ -45,6 +45,25 @@ pub struct HdfsConfig {
pub enable_append: bool,
/// atomic_write_dir of this backend
pub atomic_write_dir: Option<String>,
+ /// Whether HDFS rename should overwrite an existing target file.
+ ///
+ /// If disabled, rename will fail with `AlreadyExists` when the target
file exists.
+ pub rename_overwrite: bool,
+}
+
+#[allow(deprecated)]
+impl Default for HdfsConfig {
Review Comment:
@erickguan Thanks very much for reviewing. nice advice, have fixed and
pushed.
##########
core/services/hdfs/src/core.rs:
##########
@@ -37,10 +38,30 @@ impl Debug for HdfsCore {
f.debug_struct("HdfsCore")
.field("root", &self.root)
.field("atomic_write_dir", &self.atomic_write_dir)
+ .field("rename_overwrite", &self.rename_overwrite)
.finish_non_exhaustive()
}
}
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+enum HdfsRenameTargetAction {
Review Comment:
have fixed.
--
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]