IMPALA-3472: hdfs-util-test failing on local FS

Our GetFilesystemNameLength() function had a special case for
locations starting with "file:". However, if a scheme had only one
'/' in the scheme delimiter (i.e. ':/' vs '://'), we would return '0'
as the length for that URI.

This is exactly what one of our test cases in hdfs-util-test was
doing. I think it's safe to say we will never get a scheme with only
one following '/' for schemes other than "file:", so I've changed that
testcase.

Change-Id: I0f1232345c62db48575530785c79c0ffe77c2772
Reviewed-on: http://gerrit.cloudera.org:8080/2958
Reviewed-by: Sailesh Mukil <[email protected]>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/b5d77f43
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/b5d77f43
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/b5d77f43

Branch: refs/heads/master
Commit: b5d77f43f41c565c08a24a701c4524e3d5d00012
Parents: 34c95c9
Author: Sailesh Mukil <[email protected]>
Authored: Wed May 4 23:00:59 2016 -0700
Committer: Tim Armstrong <[email protected]>
Committed: Thu May 12 14:17:55 2016 -0700

----------------------------------------------------------------------
 be/src/util/hdfs-util-test.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/b5d77f43/be/src/util/hdfs-util-test.cc
----------------------------------------------------------------------
diff --git a/be/src/util/hdfs-util-test.cc b/be/src/util/hdfs-util-test.cc
index 73ff4bf..61185ae 100644
--- a/be/src/util/hdfs-util-test.cc
+++ b/be/src/util/hdfs-util-test.cc
@@ -53,7 +53,7 @@ TEST(HdfsUtilTest, CheckFilesystemsMatch) {
   EXPECT_TRUE(FilesystemsMatch("file:///path/to/dir/filename.parq",
                                "file:/path_2/to/dir/filename.parq"));
   EXPECT_FALSE(FilesystemsMatch("file:/path/to/dir/filename.parq",
-                                "file2:/path/to/dir/filename.parq"));
+                                "file2://path/to/dir/filename.parq"));
   EXPECT_FALSE(FilesystemsMatch("hdfs://", 
"s3a://dummybucket/temp_dir/temp_path"));
   EXPECT_TRUE(FilesystemsMatch("hdfs://namenode", "hdfs://namenode/"));
 

Reply via email to