Skip to content

Commit

Permalink
[Flink] Throw exception when create table dir failed (#487)
Browse files Browse the repository at this point in the history
Signed-off-by: chenxu <chenxu@dmetasoul.com>
Co-authored-by: chenxu <chenxu@dmetasoul.com>
  • Loading branch information
xuchen-plus and dmetasoul01 committed May 10, 2024
1 parent d16f40e commit b0f024f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b0f024f

Please sign in to comment.