[ 
https://issues.apache.org/jira/browse/HDFS-16807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17620206#comment-17620206
 ] 

JiangHua Zhu commented on HDFS-16807:
-------------------------------------

Can you guys post some suggestions? [~weichiu] [~aajisaka] [~hexiaoqiao] 
[~steve_l] [~ayushtkn].
Any suggestion is fine.


> Improve legacy ClientProtocol#rename2() interface
> -------------------------------------------------
>
>                 Key: HDFS-16807
>                 URL: https://issues.apache.org/jira/browse/HDFS-16807
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: dfsclient
>    Affects Versions: 3.3.3
>            Reporter: JiangHua Zhu
>            Priority: Major
>
> In HDFS-2298, rename2() replaced rename(), which is a very meaningful 
> improvement. It looks like some old customs are still preserved, they are:
> 1. When using the shell to execute the mv command, rename() is still used.
> ./bin/hdfs dfs -mv [source] [target]
> {code:java}
> In MoveCommands#Rename:
>     protected void processPath(PathData src, PathData target) throws 
> IOException {
>       ......
>       if (!target.fs.rename(src.path, target.path)) {
>         // we have no way to know the actual error...
>         throw new PathIOException(src.toString());
>       }
>     }
> {code}
> 2. When NNThroughputBenchmark verifies the rename.
> In NNThroughputBenchmark#RenameFileStats:
> {code:java}
> long executeOp(int daemonId, int inputIdx, String ignore)
>     throws IOException {
>       long start = Time.now();
>       clientProto.rename(fileNames[daemonId][inputIdx],
>                       destNames[daemonId][inputIdx]);
>       long end = Time.now();
>       return end-start;
>     }
> {code}
> I think the interface should be kept uniform since rename() is deprecated. 
> For NNThroughputBenchmark, it's easy. But it is not easy to improve 
> MoveCommands, because it involves the transformation of FileSystem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to