hadoop-yetus commented on a change in pull request #743: HADOOP-11452 make
rename/3 public
URL: https://github.com/apache/hadoop/pull/743#discussion_r275733013
##########
File path:
hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
##########
@@ -1211,9 +1224,184 @@ HDFS fails without raising an exception; `rename()`
merely returns false.
FS' = FS
result = false
-The behavior of HDFS here should not be considered a feature to replicate.
-`FileContext` explicitly changed the behavior to raise an exception, and the
retrofitting of that action
-to the `DFSFileSystem` implementation is an ongoing matter for debate.
+The behavior of HDFS here must not be considered a feature to replicate.
+
+
+### `void rename(Path source, Path dest, Rename...options)`
+
+This is a stricter version of `rename(src, dest)`, which:
+
+1. Defines the policy on overwriting paths.
+1. Defines the policy on nonexistent source paths.
+1. MUST raise an exception on all failure conditions.
+1. Has no return code. If the method does not raise an exception, it has
+succeeded.
+
+The semantics of this method are simpler and more clearly defined.
+
+- The final path of the rename is always that of the `dest` argument; there
+is no attempt to generate a new path underneath a target directory.
Review comment:
whitespace:end of line
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]