[
https://issues.apache.org/jira/browse/HADOOP-14455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16098042#comment-16098042
]
Vinayakumar B commented on HADOOP-14455:
----------------------------------------
Patch looks almost good.
Just 2 nits, You can commit once addressed.
1. Even though reaching this line is impossible now, it should be
{{IllegalArgumentException}} not {{IllegalStateException}}.
{code}+ default:
+ throw new IllegalStateException("Unexpected rename strategy");
}
{code}
2. In below code, you can remove the comment line. Its no longer relavant here
{code}- resSrc.targetFileSystem.renameInternal(resSrc.remainingPath,
- resDst.remainingPath, overwrite);
+ //Alternate 1: renames within same file system
+ URI srcUri = resSrc.targetFileSystem.getUri();
+ URI dstUri = resDst.targetFileSystem.getUri();
+ ViewFileSystem.verifyRenameStrategy(srcUri, dstUri,
+ resSrc.targetFileSystem == resDst.targetFileSystem,
renameStrategy);{code}
Once addressed, you can commit, unless others have different opinion
> ViewFileSystem#rename should support be supported within same nameservice
> with different mountpoints
> ----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-14455
> URL: https://issues.apache.org/jira/browse/HADOOP-14455
> Project: Hadoop Common
> Issue Type: Improvement
> Components: viewfs
> Reporter: Brahma Reddy Battula
> Assignee: Brahma Reddy Battula
> Attachments: HADOOP-14455-002.patch, HADOOP-14455-003.patch,
> HADOOP-14455-004.patch, HADOOP-14455-005.patch, HADOOP-14455-006.patch,
> HADOOP-14455.patch
>
>
> *Scenario:*
> || Mount Point || NameService|| Value||
> |/tmp|hacluster|/tmp|
> |/user|hacluster|/user|
> Move file from {{/tmp}} to {{/user}}
> It will fail by throwing the following error
> {noformat}
> Caused by: java.io.IOException: Renames across Mount points not supported
> at
> org.apache.hadoop.fs.viewfs.ViewFileSystem.rename(ViewFileSystem.java:500)
> at org.apache.hadoop.hive.ql.metadata.Hive.moveFile(Hive.java:2692)
> ... 22 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]