yihua opened a new issue, #13932:
URL: https://github.com/apache/hudi/issues/13932

   ### Bug Description
   
   **What happened:**
   
   The following exception is thrown when using Hudi 1.0.2 release to read a 
HFile written by the native HFile writer from master
   ```
   Caused by: java.io.IOException: Unable to construct HFile reader
        at 
org.apache.hudi.io.storage.HoodieNativeAvroHFileReader.loadAllMetaInfoIntoCacheIfNeeded(HoodieNativeAvroHFileReader.java:279)
        at 
org.apache.hudi.io.storage.HoodieNativeAvroHFileReader.getHFileMetaInfoFromCache(HoodieNativeAvroHFileReader.java:262)
        at 
org.apache.hudi.io.storage.HoodieNativeAvroHFileReader.fetchSchema(HoodieNativeAvroHFileReader.java:239)
        ... 140 more
   Caused by: java.lang.ArithmeticException: / by zero
        at 
org.apache.hudi.io.hfile.HFileBlock.numChecksumChunks(HFileBlock.java:160)
        at 
org.apache.hudi.io.hfile.HFileBlock.numChecksumBytes(HFileBlock.java:149)
        at org.apache.hudi.io.hfile.HFileBlock.<init>(HFileBlock.java:95)
        at 
org.apache.hudi.io.hfile.HFileRootIndexBlock.<init>(HFileRootIndexBlock.java:41)
        at org.apache.hudi.io.hfile.HFileBlock.parse(HFileBlock.java:124)
        at 
org.apache.hudi.io.hfile.HFileBlockReader.nextBlock(HFileBlockReader.java:83)
        at 
org.apache.hudi.io.hfile.HFileReaderImpl.readDataBlockIndex(HFileReaderImpl.java:338)
        at 
org.apache.hudi.io.hfile.HFileReaderImpl.initializeMetadata(HFileReaderImpl.java:80)
        at 
org.apache.hudi.io.hfile.HFileReaderImpl.getNumKeyValueEntries(HFileReaderImpl.java:114)
        at 
org.apache.hudi.io.storage.HoodieNativeAvroHFileReader.loadAllMetaInfoIntoCacheIfNeeded(HoodieNativeAvroHFileReader.java:270)
        ... 142 more
   ```
   
   **What you expected:**
   
   It should be work as an requirement for compatibility.
   
   **Steps to reproduce:**
   1. Write a table using master with MDT enabled
   2. Read the table using Hudi 1.0.2 release
   
   
   ### Environment
   
   **Hudi version:**
   **Query engine:** (Spark/Flink/Trino etc)
   **Relevant configs:**
   
   
   ### Logs and Stack Trace
   
   _No response_


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to