yihua commented on code in PR #11048:
URL: https://github.com/apache/hudi/pull/11048#discussion_r1569859081


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/hadoop/fs/HadoopFSUtils.java:
##########
@@ -154,4 +158,90 @@ public static FileStatus 
convertToHadoopFileStatus(StoragePathInfo pathInfo) {
         pathInfo.getModificationTime(),
         convertToHadoopPath(pathInfo.getPath()));
   }
+
+  /**
+   * Fetch the right {@link FSDataInputStream} to be used by wrapping with 
required input streams.
+   *
+   * @param fs         instance of {@link FileSystem} in use.
+   * @param filePath   path of the file.
+   * @param bufferSize buffer size to be used.
+   * @return the right {@link FSDataInputStream} as required.
+   */
+  public static FSDataInputStream getFSDataInputStream(FileSystem fs,
+                                                       StoragePath filePath,
+                                                       int bufferSize) {
+    FSDataInputStream fsDataInputStream = null;
+    try {
+      fsDataInputStream = fs.open(new Path(filePath.toUri()), bufferSize);

Review Comment:
   Good catch.  We have the util method.  Fixed.



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