public interface PythonFunctionFactory
Modifier and Type | Interface and Description |
---|---|
static class |
PythonFunctionFactory.CacheKey
The cache key.
|
Modifier and Type | Field and Description |
---|---|
static ScheduledExecutorService |
CACHE_CLEANUP_EXECUTOR_SERVICE |
static AtomicReference<Boolean> |
CACHE_CLEANUP_EXECUTOR_SERVICE_STARTED |
static org.apache.flink.shaded.guava31.com.google.common.cache.LoadingCache<PythonFunctionFactory.CacheKey,PythonFunctionFactory> |
PYTHON_FUNCTION_FACTORY_CACHE |
Modifier and Type | Method and Description |
---|---|
static PythonFunctionFactory |
createPythonFunctionFactory(ReadableConfig config) |
static void |
ensureCacheCleanupExecutorServiceStarted() |
static PythonFunction |
getPythonFunction(String fullyQualifiedName,
ReadableConfig config,
ClassLoader classLoader)
Returns PythonFunction according to the fully qualified name of the Python UDF i.e
${moduleName}.
|
PythonFunction |
getPythonFunction(String moduleName,
String objectName)
Returns PythonFunction according to moduleName and objectName.
|
static final ScheduledExecutorService CACHE_CLEANUP_EXECUTOR_SERVICE
static final AtomicReference<Boolean> CACHE_CLEANUP_EXECUTOR_SERVICE_STARTED
static final org.apache.flink.shaded.guava31.com.google.common.cache.LoadingCache<PythonFunctionFactory.CacheKey,PythonFunctionFactory> PYTHON_FUNCTION_FACTORY_CACHE
PythonFunction getPythonFunction(String moduleName, String objectName)
moduleName
- The module name of the Python UDF.objectName
- The function name / class name of the Python UDF.static PythonFunction getPythonFunction(String fullyQualifiedName, ReadableConfig config, ClassLoader classLoader) throws ExecutionException
fullyQualifiedName
- The fully qualified name of the Python UDF.config
- The configuration of python dependencies.classLoader
- The classloader which is used to identify different jobs.ExecutionException
static void ensureCacheCleanupExecutorServiceStarted()
static PythonFunctionFactory createPythonFunctionFactory(ReadableConfig config) throws ExecutionException, InterruptedException, IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.