File tree Expand file tree Collapse file tree
hudi-common/src/main/java/org/apache/hudi/common/table/view Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -315,13 +315,16 @@ private void ensurePartitionLoadedCorrectly(String partition) {
315315 * @throws IOException
316316 */
317317 protected FileStatus [] listPartition (Path partitionPath ) throws IOException {
318- // Create the path if it does not exist already
319- if (!metaClient .getFs ().exists (partitionPath )) {
320- metaClient .getFs ().mkdirs (partitionPath );
321- return new FileStatus [0 ];
322- } else {
318+ try {
323319 return metaClient .getFs ().listStatus (partitionPath );
320+ } catch (IOException e ) {
321+ // Create the path if it does not exist already
322+ if (!metaClient .getFs ().exists (partitionPath )) {
323+ metaClient .getFs ().mkdirs (partitionPath );
324+ return new FileStatus [0 ];
325+ }
324326 }
327+ throw new HoodieIOException (String .format ("Failed to list partition path: %s" , partitionPath ));
325328 }
326329
327330 /**
You can’t perform that action at this time.
0 commit comments