-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHADOOP-12455.patch
25 lines (24 loc) · 1.59 KB
/
HADOOP-12455.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Globber.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Globber.java
index 7c69167..2a832bb 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Globber.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Globber.java
@@ -255,7 +255,7 @@ private String authorityFromPath(Path path) throws IOException {
}
// Set the child path based on the parent path.
child.setPath(new Path(candidate.getPath(),
- child.getPath().getName()));
+ new Path(null, null, child.getPath().getName())));
if (globFilter.accept(child.getPath())) {
newCandidates.add(child);
}
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestGlobPattern.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestGlobPattern.java
index 356c442..74246c3 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestGlobPattern.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestGlobPattern.java
@@ -66,6 +66,7 @@ private void shouldThrow(String... globs) {
assertMatch(true, "{[12]*,[45]*,[78]*}", "1", "2!", "4", "42", "7", "7$");
assertMatch(false, "{[12]*,[45]*,[78]*}", "3", "6", "9ß");
assertMatch(true, "}", "}");
+ assertMatch(true, "xxx:yyy", "xxx:yyy");
}
@Test public void testInvalidPatterns() {