yihua commented on code in PR #10591: URL: https://github.com/apache/hudi/pull/10591#discussion_r1569186866
########## hudi-common/src/main/java/org/apache/hudi/common/util/MarkerUtils.java: ########## @@ -94,40 +96,40 @@ public static String stripMarkerFolderPrefix(String fullMarkerPath, String marke } /** - * @param fileSystem file system to use. - * @param markerDir marker directory. + * @param storage {@link HoodieStorage} to use. + * @param markerDir marker directory. * @return {@code true} if the MARKERS.type file exists; {@code false} otherwise. */ - public static boolean doesMarkerTypeFileExist(FileSystem fileSystem, String markerDir) throws IOException { - return fileSystem.exists(new Path(markerDir, MARKER_TYPE_FILENAME)); + public static boolean doesMarkerTypeFileExist(HoodieStorage storage, String markerDir) throws IOException { + return storage.exists(new HoodieLocation(markerDir, MARKER_TYPE_FILENAME)); } /** * Reads the marker type from `MARKERS.type` file. * - * @param fileSystem file system to use. - * @param markerDir marker directory. + * @param storage {@link HoodieStorage} to use. + * @param markerDir marker directory. * @return the marker type, or empty if the marker type file does not exist. */ - public static Option<MarkerType> readMarkerType(FileSystem fileSystem, String markerDir) { - Path markerTypeFilePath = new Path(markerDir, MARKER_TYPE_FILENAME); - InputStream inputStream = null; + public static Option<MarkerType> readMarkerType(HoodieStorage storage, String markerDir) { + HoodieLocation markerTypeFileLocation = new HoodieLocation(markerDir, MARKER_TYPE_FILENAME); + InputStream inputSteam = null; Option<MarkerType> content = Option.empty(); try { - if (!doesMarkerTypeFileExist(fileSystem, markerDir)) { + if (!doesMarkerTypeFileExist(storage, markerDir)) { return Option.empty(); } - inputStream = fileSystem.open(markerTypeFilePath); - String markerType = FileIOUtils.readAsUTFString(inputStream); + inputSteam = storage.open(markerTypeFileLocation); Review Comment: 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