LadyForest commented on a change in pull request #23:
URL: https://github.com/apache/flink-table-store/pull/23#discussion_r815396671
##########
File path:
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/FileStorePathFactory.java
##########
@@ -130,7 +130,17 @@ public Long latestSnapshotId() {
try {
Path snapshotDir = new Path(root + "/snapshot");
FileSystem fs = snapshotDir.getFileSystem();
+
+ if (!fs.exists(snapshotDir)) {
+ LOG.debug("The snapshot director '{}' is not exist.",
snapshotDir);
+ return null;
+ }
+
FileStatus[] statuses = fs.listStatus(snapshotDir);
+ if (statuses == null) {
+ throw new RuntimeException(
+ "The return value is null of the listStatus for the
snapshot director.");
Review comment:
typo here, `director` => `directory`
--
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]