Package org.apache.flink.client.python
Interface PythonFunctionFactory
- All Known Implementing Classes:
PythonFunctionFactoryImpl
public interface PythonFunctionFactory
The factory which creates the PythonFunction objects from given module name and object name.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScheduledExecutorServicestatic final AtomicReference<Boolean>static final org.apache.flink.shaded.guava32.com.google.common.cache.LoadingCache<PythonFunctionFactory.CacheKey,PythonFunctionFactory> -
Method Summary
Modifier and TypeMethodDescriptionstatic PythonFunctionFactorycreatePythonFunctionFactory(org.apache.flink.configuration.ReadableConfig config) static voidorg.apache.flink.table.functions.python.PythonFunctiongetPythonFunction(String moduleName, String objectName) Returns PythonFunction according to moduleName and objectName.static org.apache.flink.table.functions.python.PythonFunctiongetPythonFunction(String fullyQualifiedName, org.apache.flink.configuration.ReadableConfig config, ClassLoader classLoader) Returns PythonFunction according to the fully qualified name of the Python UDF i.e ${moduleName}.
-
Field Details
-
CACHE_CLEANUP_EXECUTOR_SERVICE
-
CACHE_CLEANUP_EXECUTOR_SERVICE_STARTED
-
PYTHON_FUNCTION_FACTORY_CACHE
static final org.apache.flink.shaded.guava32.com.google.common.cache.LoadingCache<PythonFunctionFactory.CacheKey,PythonFunctionFactory> PYTHON_FUNCTION_FACTORY_CACHE
-
-
Method Details
-
getPythonFunction
org.apache.flink.table.functions.python.PythonFunction getPythonFunction(String moduleName, String objectName) Returns PythonFunction according to moduleName and objectName.- Parameters:
moduleName- The module name of the Python UDF.objectName- The function name / class name of the Python UDF.- Returns:
- The PythonFunction object which represents the Python UDF.
-
getPythonFunction
static org.apache.flink.table.functions.python.PythonFunction getPythonFunction(String fullyQualifiedName, org.apache.flink.configuration.ReadableConfig config, ClassLoader classLoader) throws ExecutionException Returns PythonFunction according to the fully qualified name of the Python UDF i.e ${moduleName}.${functionName} or ${moduleName}.${className}.- Parameters:
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.- Returns:
- The PythonFunction object which represents the Python UDF.
- Throws:
ExecutionException
-
ensureCacheCleanupExecutorServiceStarted
static void ensureCacheCleanupExecutorServiceStarted() -
createPythonFunctionFactory
static PythonFunctionFactory createPythonFunctionFactory(org.apache.flink.configuration.ReadableConfig config) throws ExecutionException, InterruptedException, IOException
-