This is an automated email from the ASF dual-hosted git repository. sivabalan pushed a commit to branch release-0.5.3 in repository https://gitbox.apache.org/repos/asf/hudi.git
commit d535381e3f98008cd00161304b7a4e59644f5da0 Author: bschell <[email protected]> AuthorDate: Mon Mar 16 15:19:16 2020 -0700 Add constructor to HoodieROTablePathFilter (#1413) Allows HoodieROTablePathFilter to accept a configuration for initializing the filesystem. This fixes a bug with Presto's use of this pathfilter. Co-authored-by: Brandon Scheller <[email protected]> --- .../org/apache/hudi/hadoop/HoodieROTablePathFilter.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieROTablePathFilter.java b/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieROTablePathFilter.java index 66ec864..d879a2f 100644 --- a/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieROTablePathFilter.java +++ b/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieROTablePathFilter.java @@ -63,12 +63,21 @@ public class HoodieROTablePathFilter implements PathFilter, Serializable { */ private HashSet<String> nonHoodiePathCache; + /** + * Hadoop configurations for the FileSystem. + */ + private Configuration conf; private transient FileSystem fs; public HoodieROTablePathFilter() { - hoodiePathCache = new HashMap<>(); - nonHoodiePathCache = new HashSet<>(); + this(new Configuration()); + } + + public HoodieROTablePathFilter(Configuration conf) { + this.hoodiePathCache = new HashMap<>(); + this.nonHoodiePathCache = new HashSet<>(); + this.conf = conf; } /** @@ -93,7 +102,7 @@ public class HoodieROTablePathFilter implements PathFilter, Serializable { Path folder = null; try { if (fs == null) { - fs = path.getFileSystem(new Configuration()); + fs = path.getFileSystem(conf); } // Assumes path is a file
