in src/main/java/org/apache/paimon/trino/catalog/TrinoCatalog.java [67:94]
public void initSession(ConnectorSession connectorSession) {
if (!inited) {
synchronized (this) {
if (!inited) {
current =
ClassLoaderUtils.runWithContextClassLoader(
() -> {
TrinoFileSystem trinoFileSystem =
trinoFileSystemFactory.create(connectorSession);
CatalogContext catalogContext =
CatalogContext.create(
options,
configuration,
new TrinoFileIOLoader(trinoFileSystem),
null);
try {
SecurityContext.install(catalogContext);
} catch (Exception e) {
throw new RuntimeException(e);
}
return CatalogFactory.createCatalog(catalogContext);
},
this.getClass().getClassLoader());
inited = true;
}
}
}
}