Amend HADOOP-8408 per Daryn's post-commit feedback.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1341339 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Aaron Myers 2012-05-22 07:50:58 +00:00
parent 0a0c649c86
commit 27cfc48b3b
2 changed files with 5 additions and 6 deletions

View File

@ -236,7 +236,7 @@ public class ViewFileSystem extends FileSystem {
@Override @Override
public String getCanonicalServiceName() { public String getCanonicalServiceName() {
return getUri().getHost(); return null;
} }
@Override @Override

View File

@ -31,15 +31,15 @@ import org.junit.Test;
/** /**
* Test ViewFileSystem's support for having delegation tokens fetched and cached * Test ViewFileSystem's support for having delegation tokens fetched and cached
* for the file system. * for the file system.
*
* Currently this class just ensures that getCanonicalServiceName() always
* returns <code>null</code> for ViewFileSystem instances.
*/ */
public class TestViewFileSystemDelegationTokenSupport { public class TestViewFileSystemDelegationTokenSupport {
private static final String MOUNT_TABLE_NAME = "vfs-cluster"; 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. * Regression test for HADOOP-8408.
*/ */
@Test @Test
@ -53,8 +53,7 @@ public class TestViewFileSystemDelegationTokenSupport {
"://" + MOUNT_TABLE_NAME), conf); "://" + MOUNT_TABLE_NAME), conf);
String serviceName = viewFs.getCanonicalServiceName(); String serviceName = viewFs.getCanonicalServiceName();
assertNotNull(serviceName); assertNull(serviceName);
assertEquals(MOUNT_TABLE_NAME, serviceName);
} }
@Test @Test