lokeshj1703 opened a new pull request, #9789:
URL: https://github.com/apache/hudi/pull/9789

   ### Change Logs
   
   org.apache.hudi.io.storage.HoodieAvroHFileReader.RecordIterator#hasNext uses 
org.apache.hadoop.hbase.io.hfile.HFileScanner#isSeeked to seek to the first 
line of the file.
   ```
           if (!scanner.isSeeked()) {
             hasRecords = scanner.seekTo();
           }
   ```
   if isSeeked returns false, scanner seeks to start of file.
   
   After end of file is reached, isSeeked would still return false and the next 
time hasNext is called it seeks to start of file again leading to an infinite 
loop.
   
   Documentation for HFileScanner#isSeeked
   True is scanner has had one of the seek calls invoked; i.e. seekBefore(Cell) 
or seekTo() or seekTo(Cell). Otherwise returns false.
   
   The PR adds a flag(eof) to return false for hasNext if flag is true.
   
   ### Impact
   
   NA
   
   ### Risk level (write none, low medium or high below)
   
   low
   
   ### Documentation Update
   
   NA
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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