From b0f024f2fbbb2bb3b13e916b88962facb9eb5853 Mon Sep 17 00:00:00 2001 From: Xu Chen Date: Fri, 10 May 2024 16:16:05 +0800 Subject: [PATCH] [Flink] Throw exception when create table dir failed (#487) Signed-off-by: chenxu Co-authored-by: chenxu --- .../org/apache/flink/lakesoul/metadata/LakeSoulCatalog.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lakesoul-flink/src/main/java/org/apache/flink/lakesoul/metadata/LakeSoulCatalog.java b/lakesoul-flink/src/main/java/org/apache/flink/lakesoul/metadata/LakeSoulCatalog.java index 9ca32959c..5b62f1707 100644 --- a/lakesoul-flink/src/main/java/org/apache/flink/lakesoul/metadata/LakeSoulCatalog.java +++ b/lakesoul-flink/src/main/java/org/apache/flink/lakesoul/metadata/LakeSoulCatalog.java @@ -40,6 +40,8 @@ import org.apache.flink.table.expressions.CallExpression; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.factories.Factory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.ArrayList; @@ -75,6 +77,7 @@ public class LakeSoulCatalog implements Catalog { private static final String TABLE_PATH = "path"; private final DBManager dbManager; + private static final Logger LOG = LoggerFactory.getLogger(LakeSoulCatalog.class); public LakeSoulCatalog() { dbManager = new DBManager(); @@ -331,6 +334,8 @@ public void createTable(ObjectPath tablePath, CatalogBaseTable table, boolean ig qualifiedPath = qp.toString(); } catch (IOException e) { e.printStackTrace(); + LOG.error("Set table dir {} permission failed.", path, e); + throw new CatalogException("Set table dir " + path + " permission failed.", e); } } if (table instanceof ResolvedCatalogView) {