File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
hadoop-common-project/hadoop-common
main/java/org/apache/hadoop/fs
test/java/org/apache/hadoop/fs Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,9 @@ Release 2.1.2 - UNRELEASED
108108
109109 BUG FIXES
110110
111+ HADOOP-9776. HarFileSystem.listStatus() returns invalid authority if port
112+ number is empty. (Shanyu Zhao via ivanmi)
113+
111114Release 2.1.1-beta - 2013-09-23
112115
113116 INCOMPATIBLE CHANGES
Original file line number Diff line number Diff line change @@ -283,8 +283,9 @@ public Path getWorkingDirectory() {
283283 private String getHarAuth (URI underLyingUri ) {
284284 String auth = underLyingUri .getScheme () + "-" ;
285285 if (underLyingUri .getHost () != null ) {
286- auth += underLyingUri .getHost () + ":" ;
286+ auth += underLyingUri .getHost ();
287287 if (underLyingUri .getPort () != -1 ) {
288+ auth += ":" ;
288289 auth += underLyingUri .getPort ();
289290 }
290291 }
Original file line number Diff line number Diff line change @@ -221,6 +221,17 @@ public void testPositiveInitWithoutUnderlyingFS() throws Exception {
221221 hfs .initialize (uri , new Configuration ());
222222 }
223223
224+ @ Test
225+ public void testPositiveListFilesNotEndInColon () throws Exception {
226+ // re-initialize the har file system with host name
227+ // make sure the qualified path name does not append ":" at the end of host name
228+ final URI uri = new URI ("har://file-localhost" + harPath .toString ());
229+ harFileSystem .initialize (uri , conf );
230+ Path p1 = new Path ("har://file-localhost" + harPath .toString ());
231+ Path p2 = harFileSystem .makeQualified (p1 );
232+ assertTrue (p2 .toUri ().toString ().startsWith ("har://file-localhost/" ));
233+ }
234+
224235 // ========== Negative:
225236
226237 @ Test
You can’t perform that action at this time.
0 commit comments