hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject hadoop git commit: HADOOP-11432. Fix SymlinkBaseTest#testCreateLinkUsingPartQualPath2. (Liang Xie via gera)
Date Sat, 31 Jan 2015 02:45:43 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 054a94798 -> 26c2de36e


HADOOP-11432. Fix SymlinkBaseTest#testCreateLinkUsingPartQualPath2. (Liang Xie via gera)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/26c2de36
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/26c2de36
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/26c2de36

Branch: refs/heads/trunk
Commit: 26c2de36e2dd1b2ddedc155e49fb2ec31366d5f8
Parents: 054a947
Author: Gera Shegalov <gera@apache.org>
Authored: Fri Jan 30 18:36:37 2015 -0800
Committer: Gera Shegalov <gera@apache.org>
Committed: Fri Jan 30 18:40:40 2015 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt           |  3 +++
 .../java/org/apache/hadoop/fs/AbstractFileSystem.java     | 10 +++++++---
 .../test/java/org/apache/hadoop/fs/SymlinkBaseTest.java   |  2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/26c2de36/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index e1dca8d..37fcee7 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -805,6 +805,9 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11523. StorageException complaining " no lease ID" when updating
     FolderLastModifiedTime in WASB. (Duo Xu via cnauroth)
 
+    HADOOP-11432. Fix SymlinkBaseTest#testCreateLinkUsingPartQualPath2.
+    (Liang Xie via gera)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/26c2de36/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
index f8ae27b..92d4eca 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java
@@ -45,12 +45,13 @@ import org.apache.hadoop.fs.permission.AclEntry;
 import org.apache.hadoop.fs.permission.AclStatus;
 import org.apache.hadoop.fs.permission.FsAction;
 import org.apache.hadoop.fs.permission.FsPermission;
-import org.apache.hadoop.fs.InvalidPathException;
 import org.apache.hadoop.security.AccessControlException;
 import org.apache.hadoop.security.SecurityUtil;
 import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.util.Progressable;
 
+import com.google.common.annotations.VisibleForTesting;
+
 /**
  * This class provides an interface for implementors of a Hadoop file system
  * (analogous to the VFS of Unix). Applications do not access this class;
@@ -79,6 +80,9 @@ public abstract class AbstractFileSystem {
   
   /** The statistics for this file system. */
   protected Statistics statistics;
+
+  @VisibleForTesting
+  static final String NO_ABSTRACT_FS_ERROR = "No AbstractFileSystem configured for scheme";
   
   private final URI myUri;
   
@@ -154,8 +158,8 @@ public abstract class AbstractFileSystem {
     Class<?> clazz = conf.getClass(fsImplConf, null);
     if (clazz == null) {
       throw new UnsupportedFileSystemException(String.format(
-          "%s=null: No AbstractFileSystem configured for scheme: %s",
-          fsImplConf, uri.getScheme()));
+          "%s=null: %s: %s",
+          fsImplConf, NO_ABSTRACT_FS_ERROR, uri.getScheme()));
     }
     return (AbstractFileSystem) newInstance(clazz, uri, conf);
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/26c2de36/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java
index 4d738f7..9fe2cd7 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/SymlinkBaseTest.java
@@ -578,7 +578,7 @@ public abstract class SymlinkBaseTest {
       // Expected
       if (wrapper instanceof FileContextTestWrapper) {
         GenericTestUtils.assertExceptionContains(
-            "No AbstractFileSystem configured for scheme: null", e);
+            AbstractFileSystem.NO_ABSTRACT_FS_ERROR, e);
       } else if (wrapper instanceof FileSystemTestWrapper) {
         assertEquals("No FileSystem for scheme: null", e.getMessage());
       }


Mime
View raw message