diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 9aac0d4c9fb..bbd4ef3ced8 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -10,6 +10,9 @@ Release 2.7.2 - UNRELEASED HADOOP-12232. Upgrade Tomcat dependency to 6.0.44. (cnauroth) + HADOOP-11491. HarFs incorrectly declared as requiring an authority. + (Brahma Reddy Battula via gera) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFs.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFs.java index a2369e32802..4f5fde8b9d0 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFs.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFs.java @@ -27,7 +27,7 @@ import org.apache.hadoop.conf.Configuration; public class HarFs extends DelegateToFileSystem { HarFs(final URI theUri, final Configuration conf) throws IOException, URISyntaxException { - super(theUri, new HarFileSystem(), conf, "har", true); + super(theUri, new HarFileSystem(), conf, "har", false); } @Override diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystemBasics.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystemBasics.java index 577abfd090e..53507b932a1 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystemBasics.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystemBasics.java @@ -398,4 +398,11 @@ public class TestHarFileSystemBasics { } } + @Test + public void testHarFsWithoutAuthority() throws Exception { + final URI uri = harFileSystem.getUri(); + Assert.assertNull("har uri authority not null: " + uri, uri.getAuthority()); + FileContext.getFileContext(uri, conf); + } + }