[
https://issues.apache.org/jira/browse/HDFS-16024?focusedWorklogId=596809&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-596809
]
ASF GitHub Bot logged work on HDFS-16024:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 14/May/21 17:52
Start Date: 14/May/21 17:52
Worklog Time Spent: 10m
Work Description: goiri commented on a change in pull request #3009:
URL: https://github.com/apache/hadoop/pull/3009#discussion_r632696701
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java
##########
@@ -596,13 +620,18 @@ public boolean rename(final String src, final String dst)
final List<RemoteLocation> srcLocations =
rpcServer.getLocationsForPath(src, true, false);
- final List<RemoteLocation> dstLocations =
- rpcServer.getLocationsForPath(dst, false, false);
- // srcLocations may be trimmed by getRenameDestinations()
Review comment:
We should keep this comment
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java
##########
@@ -588,6 +589,29 @@ public long getPreferredBlockSize(String src) throws
IOException {
return rpcClient.invokeSequential(locations, method, Long.class, null);
}
+ /**
+ * Check if Path is Trash.
+ */
+ private static boolean isTrashPath(String path) throws IOException {
+ String trashRoot = FileSystem.USER_HOME_PREFIX + "/" +
+ RouterRpcServer.getRemoteUser().getUserName() + "/" +
+ FileSystem.TRASH_PREFIX;
+ return path.startsWith(trashRoot);
+ }
+
+ /**
+ * Use the combination of src locations and dst to return RemoteParam.
+ */
+ private static RemoteParam getRenameDestinations(
Review comment:
Complete the javadoc
--
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: 596809)
Time Spent: 1h 50m (was: 1h 40m)
> RBF: Rename data to the Trash should be based on src locations
> --------------------------------------------------------------
>
> Key: HDFS-16024
> URL: https://issues.apache.org/jira/browse/HDFS-16024
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: rbf
> Affects Versions: 3.4.0
> Reporter: zhu
> Assignee: zhu
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> 1.When deleting data to the Trash without configuring a mount point for the
> Trash, the Router should recognize and move the data to the Trash
> 2.When the user’s trash can is configured with a mount point and is different
> from the NS of the deleted directory, the router should identify and move the
> data to the trash can of the current user of src
> The same is true for using ViewFs mount points, I think we should be
> consistent with it
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]