You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2020/02/06 09:06:16 UTC
[GitHub] [drill] vvysotskyi commented on a change in pull request #1969:
DRILL-5733: Unable to SELECT from parquet file with Hadoop 2.7.4
vvysotskyi commented on a change in pull request #1969: DRILL-5733: Unable to SELECT from parquet file with Hadoop 2.7.4
URL: https://github.com/apache/drill/pull/1969#discussion_r375711722
##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetTableMetadataProviderImpl.java
##########
@@ -126,22 +128,23 @@ public Path getSelectionRoot() {
* @return list of cache files found in the given directory path
*/
public List<Path> populateMetaPaths(Path p, DrillFileSystem fs) throws IOException {
- List<Path> metaFilepaths = new ArrayList<>();
- for (String filename : Metadata.CURRENT_METADATA_FILENAMES) {
- metaFilepaths.add(new Path(p, filename));
- }
- for (String filename : Metadata.OLD_METADATA_FILENAMES) {
- // Read the older version of metadata file if the current version of metadata cache files donot exist.
+ if (fs.isDirectory(p)) {
+ List<Path> metaFilepaths = Arrays.stream(Metadata.CURRENT_METADATA_FILENAMES)
+ .map(filename -> new Path(p, filename))
+ .collect(Collectors.toList());
+ for (String filename : Metadata.OLD_METADATA_FILENAMES) {
+ // Read the older version of metadata file if the current version of metadata cache files do not exist.
+ if (fileExists(fs, metaFilepaths)) {
+ return metaFilepaths;
+ }
+ metaFilepaths.clear();
+ metaFilepaths.add(new Path(p, filename));
Review comment:
No, we will check whether the metadata files from the last iteration exist below the loop and in this case return list with files or an empty collection if they do not exist.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services