use of com.facebook.presto.spi.function.FunctionNamespaceManagerContext in project presto by prestodb.
the class FunctionAndTypeManager method loadFunctionNamespaceManager.
public void loadFunctionNamespaceManager(String functionNamespaceManagerName, String catalogName, Map<String, String> properties) {
requireNonNull(functionNamespaceManagerName, "functionNamespaceManagerName is null");
FunctionNamespaceManagerFactory factory = functionNamespaceManagerFactories.get(functionNamespaceManagerName);
checkState(factory != null, "No factory for function namespace manager %s", functionNamespaceManagerName);
FunctionNamespaceManager<?> functionNamespaceManager = factory.create(catalogName, properties, new FunctionNamespaceManagerContext(this));
functionNamespaceManager.setBlockEncodingSerde(blockEncodingSerde);
transactionManager.registerFunctionNamespaceManager(catalogName, functionNamespaceManager);
if (functionNamespaceManagers.putIfAbsent(catalogName, functionNamespaceManager) != null) {
throw new IllegalArgumentException(format("Function namespace manager is already registered for catalog [%s]", catalogName));
}
}
Aggregations