[
https://issues.apache.org/jira/browse/HADOOP-11452?focusedWorklogId=476154&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-476154
]
ASF GitHub Bot logged work on HADOOP-11452:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 29/Aug/20 19:20
Start Date: 29/Aug/20 19:20
Worklog Time Spent: 10m
Work Description: steveloughran commented on a change in pull request
#743:
URL: https://github.com/apache/hadoop/pull/743#discussion_r479681262
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSExceptionMessages.java
##########
@@ -51,4 +51,86 @@
public static final String PERMISSION_DENIED_BY_STICKY_BIT =
"Permission denied by sticky bit";
+
+ /**
+ * Renaming a destination under source is forbidden.
+ * This is a format string.
+ */
+ public static final String RENAME_DEST_UNDER_SOURCE =
+ "Rename destination %s is a directory or file under source %s";
+
+ /**
+ * Renaming a destination to source is forbidden.
+ * This is a format string.
+ */
+ public static final String RENAME_DEST_EQUALS_SOURCE =
+ "The source %s and destination %s are the same";
+
+ /**
+ * Renaming to root is forbidden.
+ */
+ public static final String RENAME_DEST_IS_ROOT =
+ "Rename destination cannot be the root";
+
+ /**
+ * The parent of a rename destination is not found.
+ * This is a format string.
+ */
+ public static final String RENAME_DEST_NO_PARENT_OF =
+ "Rename destination parent of %s not found";
+
+ /**
+ * The parent of a rename destination is not found.
+ * This is a format string, taking the parent path of the destination
+ */
+ public static final String RENAME_DEST_NO_PARENT =
+ "Rename destination parent %s not found";
+
+ /**
+ * The parent of a rename destination is not a directory.
+ * This is a format string.
+ */
+ public static final String RENAME_DEST_PARENT_NOT_DIRECTORY =
+ "Rename destination parent %s is a file";
+
+ /**
+ * The rename destination is not an empty directory.
+ * This is a format string.
+ */
+ public static final String RENAME_DEST_NOT_EMPTY =
+ "Rename destination directory is not empty: %s";
+
+ /**
+ * The rename destination is not an empty directory.
+ * This is a format string.
+ */
+ public static final String RENAME_DEST_EXISTS =
+ "Rename destination %s already exists";
+
+ /**
+ * The rename source doesn't exist.
+ * This is a format string.
+ */
+ public static final String RENAME_SOURCE_NOT_FOUND =
+ "Rename source %s is not found";
+
+ /**
+ * The rename source and dest are off different types
Review comment:
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 476154)
Time Spent: 1h 10m (was: 1h)
> Make FileSystem.rename(path, path, options) public, specified, tested
> ---------------------------------------------------------------------
>
> Key: HADOOP-11452
> URL: https://issues.apache.org/jira/browse/HADOOP-11452
> Project: Hadoop Common
> Issue Type: Task
> Components: fs
> Affects Versions: 2.7.3
> Reporter: Yi Liu
> Assignee: Steve Loughran
> Priority: Major
> Labels: pull-request-available
> Attachments: HADOOP-11452-001.patch, HADOOP-11452-002.patch,
> HADOOP-14452-004.patch, HADOOP-14452-branch-2-003.patch
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Currently in {{FileSystem}}, {{rename}} with _Rename options_ is protected
> and with _deprecated_ annotation. And the default implementation is not
> atomic.
> So this method is not able to be used outside. On the other hand, HDFS has a
> good and atomic implementation. (Also an interesting thing in {{DFSClient}},
> the _deprecated_ annotations for these two methods are opposite).
> It makes sense to make public for {{rename}} with _Rename options_, since
> it's atomic for rename+overwrite, also it saves RPC calls if user desires
> rename+overwrite.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]