[
https://issues.apache.org/jira/browse/DRILL-7063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16810106#comment-16810106
]
ASF GitHub Bot commented on DRILL-7063:
---------------------------------------
amansinha100 commented on pull request #1723: DRILL-7063: Seperate metadata
cache file into summary, file metadata
URL: https://github.com/apache/drill/pull/1723#discussion_r272252957
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
##########
@@ -298,11 +298,28 @@ public DrillTable isReadable(DrillFileSystem fs,
FileSelection selection,
}
private Path getMetadataPath(FileStatus dir) {
- return new Path(dir.getPath(), Metadata.METADATA_FILENAME);
+ return new Path(dir.getPath(), Metadata.OLD_METADATA_FILENAME);
+ }
+
+ /**
+ * Check if the metadata version 4 files exist
+ * @param dir the path of the directory
+ * @param fs
+ * @return true if both file metadata and summary cache file exist
+ * @throws IOException in case of problems during accessing files
+ */
+ private boolean currentMetadataFileExists(FileStatus dir, FileSystem fs)
throws IOException {
+ for (String metaFileName : Metadata.CURRENT_METADATA_FILENAMES) {
+ Path path = new Path(dir.getPath(), metaFileName);
+ if (!fs.exists(path)) {
+ return false;
+ }
+ }
+ return true;
}
private boolean metaDataFileExists(FileSystem fs, FileStatus dir) throws
IOException {
- return fs.exists(getMetadataPath(dir));
+ return fs.exists(getMetadataPath(dir)) || currentMetadataFileExists(dir,
fs);
Review comment:
Seems like we should only need `currentMetadataFileExists()` which subsumes
this method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Create separate summary file for schema, totalRowCount, totalNullCount
> (includes maintenance)
> ---------------------------------------------------------------------------------------------
>
> Key: DRILL-7063
> URL: https://issues.apache.org/jira/browse/DRILL-7063
> Project: Apache Drill
> Issue Type: Sub-task
> Components: Metadata
> Reporter: Venkata Jyothsna Donapati
> Assignee: Venkata Jyothsna Donapati
> Priority: Major
> Fix For: 1.16.0
>
> Original Estimate: 252h
> Remaining Estimate: 252h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)