From 23b96766ad0312cdc1bfea2e3e2b2c3fea8831f6 Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Tue, 22 May 2012 07:50:00 +0000 Subject: [PATCH] Amend HADOOP-8408 per Daryn's post-commit feedback. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1341338 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java | 2 +- .../viewfs/TestViewFileSystemDelegationTokenSupport.java | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java index bd27886d2af..36771e37b86 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java @@ -236,7 +236,7 @@ public Path getTrashCanLocation(final Path f) throws FileNotFoundException { @Override public String getCanonicalServiceName() { - return getUri().getHost(); + return null; } @Override diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java index 57c79116d99..0d165f1f403 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java @@ -31,15 +31,15 @@ /** * Test ViewFileSystem's support for having delegation tokens fetched and cached * for the file system. + * + * Currently this class just ensures that getCanonicalServiceName() always + * returns null for ViewFileSystem instances. */ public class TestViewFileSystemDelegationTokenSupport { private static final String MOUNT_TABLE_NAME = "vfs-cluster"; /** - * Ensure that a canonical service name can be determined for ViewFileSystem - * instances configured with a non-default mount table name. - * * Regression test for HADOOP-8408. */ @Test @@ -53,8 +53,7 @@ public void testGetCanonicalServiceNameWithNonDefaultMountTable() "://" + MOUNT_TABLE_NAME), conf); String serviceName = viewFs.getCanonicalServiceName(); - assertNotNull(serviceName); - assertEquals(MOUNT_TABLE_NAME, serviceName); + assertNull(serviceName); } @Test