nsivabalan commented on code in PR #6031:
URL: https://github.com/apache/hudi/pull/6031#discussion_r965431369


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFileReader.java:
##########
@@ -516,4 +521,23 @@ private static FSDataInputStream 
getFSDataInputStreamForGCS(FSDataInputStream fs
 
     return fsDataInputStream;
   }
+
+  /**
+   * Some filesystem(such as chdfs) will throw {@code IOException} instead of 
{@code EOFException}. It will cause error in isBlockCorrupted().
+   * Wrapped by {@code BoundedFsDataInputStream}, to check whether the desired 
offset is out of the file size in advance.
+   */
+  private static FSDataInputStream 
wrapStreamByBoundedFsDataInputStream(FileSystem fs,

Review Comment:
   if we call this method in Line 490 above, we don't need lines 533 to 539 
right. 
   essentially
   line 493 could be
   ```
   return FSUtils.shouldWrappedByBoundedDataStream(fs) : new 
BoundedFsDataInputStream(fs, logFile.getPath(), fsDataInputStream): 
fsDataInputStream; 
   ```
   



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to