hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1392627 - in /hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
Date Mon, 01 Oct 2012 21:29:35 GMT
Author: bobby
Date: Mon Oct  1 21:29:34 2012
New Revision: 1392627

URL: http://svn.apache.org/viewvc?rev=1392627&view=rev
Log:
svn merge -c 1392622 FIXES: HADOOP-8310. FileContext#checkPath should handle URIs with no
port. Contributed by Aaron T. Myers.

Added:
    hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
      - copied unchanged from r1392622, hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
Modified:
    hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java

Modified: hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1392627&r1=1392626&r2=1392627&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/CHANGES.txt Mon
Oct  1 21:29:34 2012
@@ -1,17 +1,5 @@
 Hadoop Change Log
 
-Release 0.23.5 - UNRELEASED
-
-  INCOMPATIBLE CHANGES
-
-  NEW FEATURES
-
-  IMPROVEMENTS
-
-  OPTIMIZATIONS
-
-  BUG FIXES
-
 Release 0.23.4 - UNRELEASED
 
   INCOMPATIBLE CHANGES
@@ -37,6 +25,8 @@ Release 0.23.4 - UNRELEASED
     HADOOP-8623. hadoop jar command should respect HADOOP_OPTS.
     (Steven Willis via suresh)
 
+    HADOOP-8310. FileContext#checkPath should handle URIs with no port. (atm)
+
 Release 0.23.3
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java?rev=1392627&r1=1392626&r2=1392627&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
(original)
+++ hadoop/common/branches/branch-0.23.4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
Mon Oct  1 21:29:34 2012
@@ -352,20 +352,23 @@ public abstract class AbstractFileSystem
       }
     }
     String thisScheme = this.getUri().getScheme();
-    String thisAuthority = this.getUri().getAuthority();
+    String thisHost = this.getUri().getHost();
+    String thatHost = uri.getHost();
     
-    // Schemes and authorities must match.
+    // Schemes and hosts must match.
     // Allow for null Authority for file:///
     if (!thisScheme.equalsIgnoreCase(thatScheme) ||
-       (thisAuthority != null && 
-            !thisAuthority.equalsIgnoreCase(thatAuthority)) ||
-       (thisAuthority == null && thatAuthority != null)) {
+       (thisHost != null && 
+            !thisHost.equalsIgnoreCase(thatHost)) ||
+       (thisHost == null && thatHost != null)) {
       throw new InvalidPathException("Wrong FS: " + path + ", expected: "
           + this.getUri());
     }
     
+    // Ports must match, unless this FS instance is using the default port, in
+    // which case the port may be omitted from the given URI
     int thisPort = this.getUri().getPort();
-    int thatPort = path.toUri().getPort();
+    int thatPort = uri.getPort();
     if (thatPort == -1) { // -1 => defaultPort of Uri scheme
       thatPort = this.getUriDefaultPort();
     }



Mime
View raw message