dvjyothsna commented on a change in pull request #1723: DRILL-7063: Seperate 
metadata cache file into summary, file metadata
URL: https://github.com/apache/drill/pull/1723#discussion_r272415194
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/metadata/Metadata.java
 ##########
 @@ -149,20 +157,25 @@ public static ParquetTableMetadata_v3 
getParquetTableMetadata(Map<FileStatus, Fi
    * Get the parquet metadata for the table by reading the metadata file
    *
    * @param fs current file system
-   * @param path The path to the metadata file, located in the directory that 
contains the parquet files
+   * @param paths The path to the metadata file, located in the directory that 
contains the parquet files
    * @param metaContext metadata context
    * @param readerConfig parquet reader configuration
    * @return parquet table metadata. Null if metadata cache is missing, 
unsupported or corrupted
    */
   public static @Nullable ParquetTableMetadataBase readBlockMeta(FileSystem fs,
-                                                                 Path path,
+                                                                 List<Path> 
paths,
                                                                  
MetadataContext metaContext,
                                                                  
ParquetReaderConfig readerConfig) {
-    if (ignoreReadingMetadata(metaContext, path)) {
-      return null;
-    }
     Metadata metadata = new Metadata(readerConfig);
-    metadata.readBlockMeta(path, false, metaContext, fs);
+    if (paths.isEmpty()) {
+      metaContext.setMetadataCacheCorrupted(true);
+    }
+    for (Path path: paths) {
+      if (ignoreReadingMetadata(metaContext, path)) {
+        return null;
 
 Review comment:
   Paths contain paths for Summary and File metadata file. If we pull out the 
ignoreReadingMetadata out of the for loop, we won't be able to ignore reading 
the Paths[1] file if the Paths[0] one fails. We would like to ignore reading of 
the metadata if the reading of the Paths[0] file fails.

----------------------------------------------------------------
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

Reply via email to