danny0405 commented on code in PR #9651:
URL: https://github.com/apache/hudi/pull/9651#discussion_r1329452890
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/meta/CkpMetadata.java:
##########
@@ -233,12 +210,18 @@ private Path fullPath(String fileName) {
return new Path(path, fileName);
}
- private List<CkpMessage> scanCkpMetadata(Path ckpMetaPath) throws
IOException {
+ protected Stream<CkpMessage> fetchCkpMessages(Path ckpMetaPath) throws
IOException {
// This is required when the storage is minio
if (!this.fs.exists(ckpMetaPath)) {
- return new ArrayList<>();
+ return Stream.empty();
}
- return Arrays.stream(this.fs.listStatus(ckpMetaPath)).map(CkpMessage::new)
+ Stream<CkpMessage> ckpMessageStream;
+ ckpMessageStream =
Arrays.stream(this.fs.listStatus(ckpMetaPath)).map(CkpMessage::new);
+ return ckpMessageStream;
Review Comment:
Can we inline `ckpMessageStream` ?
--
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]