From 46de25d5fd7fc5aedc574fc6bb76e14efb46bb37 Mon Sep 17 00:00:00 2001 From: WangMinChao <33626973+mincwang@users.noreply.github.com> Date: Mon, 13 Dec 2021 20:41:03 +0800 Subject: [PATCH] =?UTF-8?q?[HUDI-2994]=20Add=20judgement=20to=20existed=20?= =?UTF-8?q?partitionPath=20in=20the=20catch=20code=20block=20for=20HU?= =?UTF-8?q?=E2=80=A6=20(#4294)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [HUDI-2994] Add judgement to existed partition path in the catch code block for HUDI-2743 Co-authored-by: wangminchao --- .../hudi/common/table/view/AbstractTableFileSystemView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java b/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java index d946cff95..a626c1b5e 100644 --- a/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java +++ b/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java @@ -336,9 +336,11 @@ public abstract class AbstractTableFileSystemView implements SyncableFileSystemV if (!metaClient.getFs().exists(partitionPath)) { metaClient.getFs().mkdirs(partitionPath); return new FileStatus[0]; + } else { + // in case the partition path was created by another caller + return metaClient.getFs().listStatus(partitionPath); } } - throw new HoodieIOException(String.format("Failed to list partition path: %s", partitionPath)); } /**