Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,16 @@ private void ensurePartitionLoadedCorrectly(String partition) {
* @throws IOException
*/
protected FileStatus[] listPartition(Path partitionPath) throws IOException {
// Create the path if it does not exist already
if (!metaClient.getFs().exists(partitionPath)) {
metaClient.getFs().mkdirs(partitionPath);
return new FileStatus[0];
} else {
try {
return metaClient.getFs().listStatus(partitionPath);
} catch (IOException e) {
// Create the path if it does not exist already
if (!metaClient.getFs().exists(partitionPath)) {
metaClient.getFs().mkdirs(partitionPath);
return new FileStatus[0];
}
}
throw new HoodieIOException(String.format("Failed to list partition path: %s", partitionPath));
}

/**
Expand Down