Author: cmccabe Date: Fri Aug 2 21:47:43 2013 New Revision: 1509876 URL: http://svn.apache.org/r1509876 Log: HADOOP-9761. ViewFileSystem#rename fails when using DistributedFileSystem (Andrew Wang via Colin Patrick McCabe)
Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1509876&r1=1509875&r2=1509876&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Fri Aug 2 21:47:43 2013 @@ -39,6 +39,9 @@ Release 2.3.0 - UNRELEASED HADOOP-9806 PortmapInterface should check if the procedure is out-of-range (brandonli) + HADOOP-9761. ViewFileSystem#rename fails when using DistributedFileSystem. + (Andrew Wang via Colin Patrick McCabe) + Release 2.1.1-beta - UNRELEASED INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java?rev=1509876&r1=1509875&r2=1509876&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystemLinkResolver.java Fri Aug 2 21:47:43 2013 @@ -73,7 +73,9 @@ public abstract class FileSystemLinkReso int count = 0; T in = null; Path p = path; - FileSystem fs = FileSystem.getFSofPath(p, filesys.getConf()); + // Assumes path belongs to this FileSystem. + // Callers validate this by passing paths through FileSystem#checkPath + FileSystem fs = filesys; for (boolean isLink = true; isLink;) { try { in = doCall(p);