arina-ielchiieva 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_r375700370
##########
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.
Review comment:
does 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:
[email protected]
With regards,
Apache Git Services