You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/04/23 05:59:55 UTC
[incubator-paimon-presto] branch main updated: [security] add SecurityContext.install (#4)
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-presto.git
The following commit(s) were added to refs/heads/main by this push:
new 362dfba [security] add SecurityContext.install (#4)
362dfba is described below
commit 362dfba50ed551f2c905c9f013ab449950da1e52
Author: s7monk <34...@users.noreply.github.com>
AuthorDate: Sun Apr 23 13:59:50 2023 +0800
[security] add SecurityContext.install (#4)
---
.../src/main/java/org/apache/paimon/presto/PrestoMetadata.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoMetadata.java b/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoMetadata.java
index 99d0fe5..7d94123 100644
--- a/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoMetadata.java
+++ b/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoMetadata.java
@@ -25,6 +25,7 @@ import org.apache.paimon.catalog.CatalogFactory;
import org.apache.paimon.catalog.Identifier;
import org.apache.paimon.options.Options;
import org.apache.paimon.schema.Schema;
+import org.apache.paimon.security.SecurityContext;
import org.apache.paimon.utils.InstantiationUtil;
import org.apache.paimon.utils.StringUtils;
@@ -73,6 +74,11 @@ public class PrestoMetadata implements ConnectorMetadata {
private final TypeManager typeManager;
public PrestoMetadata(Options catalogOptions, TypeManager typeManager) {
+ try {
+ SecurityContext.install(catalogOptions);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
this.catalog = CatalogFactory.createCatalog(CatalogContext.create(catalogOptions));
this.typeManager = typeManager;
}