vinothchandar commented on a change in pull request #953: [HUDI-121] Fix 
licensing issues found during RC voting by general incubator group
URL: https://github.com/apache/incubator-hudi/pull/953#discussion_r335346251
 
 

 ##########
 File path: 
hudi-common/src/main/java/org/apache/hudi/common/util/ParquetUtils.java
 ##########
 @@ -140,14 +142,22 @@ public static Schema readAvroSchema(Configuration 
configuration, Path parquetFil
    * Read out the bloom filter from the parquet file meta data.
    */
   public static BloomFilter readBloomFilterFromParquetMetadata(Configuration 
configuration, Path parquetFilePath) {
-    String footerVal =
-        readParquetFooter(configuration, parquetFilePath, 
HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY)
-            .get(0);
+    List<String> footerVals =
+        readParquetFooter(configuration, false, parquetFilePath,
+            HoodieAvroWriteSupport.HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY,
+            HoodieAvroWriteSupport.OLD_HOODIE_AVRO_BLOOM_FILTER_METADATA_KEY);
+    String footerVal;
+    if (null != footerVals.get(0)) {
+      footerVal = footerVals.get(0);
+    } else {
+      // We use old style key "com.uber.hoodie.bloomfilter"
+      footerVal = footerVals.get(1);
 
 Review comment:
   since required is false here.. if we dont find 0 and 1, then it will NPE? 
since footerVals have two null entries.. Handling this via nulls still feels 
risky to me. 

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