aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/store
diff options
context:
space:
mode:
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/store')
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/MetadataContext.java11
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java1
2 files changed, 12 insertions, 0 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/MetadataContext.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/MetadataContext.java
index 073847812..5d3c18e92 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/MetadataContext.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/MetadataContext.java
@@ -17,6 +17,7 @@
*/
package org.apache.drill.exec.store.dfs;
+import java.util.List;
import java.util.Map;
import org.apache.drill.shaded.guava.com.google.common.collect.Maps;
@@ -39,6 +40,8 @@ public class MetadataContext {
private boolean metadataCacheCorrupted;
+ private List<Path> directories;
+
public void setStatus(Path dir) {
dirModifCheckMap.put(dir, true);
}
@@ -83,6 +86,14 @@ public class MetadataContext {
this.metadataCacheCorrupted = metadataCacheCorrupted;
}
+ public void setDirectories(List<Path> directories) {
+ this.directories = directories;
+ }
+
+ public List<Path> getDirectories() {
+ return directories;
+ }
+
public enum PruneStatus {
NOT_STARTED, // initial state
PRUNED, // partitions were pruned
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
index df84a9d1c..17a950644 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
@@ -276,6 +276,7 @@ public class ParquetFormatPlugin implements FormatPlugin {
ParquetReaderConfig readerConfig = ParquetReaderConfig.builder().withFormatConfig(formatConfig).build();
ParquetTableMetadataDirs mDirs = Metadata.readMetadataDirs(fs, dirMetaPath, metaContext, readerConfig);
if (mDirs != null && mDirs.getDirectories().size() > 0) {
+ metaContext.setDirectories(mDirs.getDirectories());
FileSelection dirSelection = FileSelection.createFromDirectories(mDirs.getDirectories(), selection,
selection.getSelectionRoot() /* cacheFileRoot initially points to selectionRoot */);
dirSelection.setExpandedPartial();