Class ProcessPythonEnvironmentManager
- java.lang.Object
-
- org.apache.flink.python.env.AbstractPythonEnvironmentManager
-
- org.apache.flink.python.env.process.ProcessPythonEnvironmentManager
-
- All Implemented Interfaces:
AutoCloseable
,PythonEnvironmentManager
@Internal public final class ProcessPythonEnvironmentManager extends AbstractPythonEnvironmentManager
The ProcessPythonEnvironmentManager is used to prepare the working dir of python UDF worker and create ProcessPythonEnvironment object of Beam Fn API. It's used when the python function runner is configured to run python UDF in process mode.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.python.env.AbstractPythonEnvironmentManager
AbstractPythonEnvironmentManager.PythonLeasedResource
-
-
Field Summary
-
Fields inherited from class org.apache.flink.python.env.AbstractPythonEnvironmentManager
dependencyInfo, PYFLINK_GATEWAY_DISABLED, PYTHON_ARCHIVES_DIR, PYTHON_FILES_DIR, PYTHON_REQUIREMENTS_CACHE, PYTHON_REQUIREMENTS_DIR, PYTHON_REQUIREMENTS_FILE, PYTHON_REQUIREMENTS_INSTALL_DIR, PYTHON_WORKING_DIR, resource
-
-
Constructor Summary
Constructors Constructor Description ProcessPythonEnvironmentManager(PythonDependencyInfo dependencyInfo, String[] tmpDirectories, Map<String,String> systemEnv, JobID jobID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PythonEnvironment
createEnvironment()
Creates the PythonEnvironment object used to execute Python functions.String
createRetrievalToken()
Returns an empty RetrievalToken because no files will be transmit via ArtifactService in process mode.String
getBootLog()
Returns the boot log of the Python Environment.-
Methods inherited from class org.apache.flink.python.env.AbstractPythonEnvironmentManager
close, constructEnvironmentVariables, getBaseDirectory, getPythonEnv, open
-
-
-
-
Method Detail
-
createEnvironment
public PythonEnvironment createEnvironment() throws Exception
Description copied from interface:PythonEnvironmentManager
Creates the PythonEnvironment object used to execute Python functions.- Returns:
- The PythonEnvironment object which represents the environment(embedded thread, process, docker, etc) the python worker would run in.
- Throws:
Exception
-
createRetrievalToken
public String createRetrievalToken() throws IOException
Returns an empty RetrievalToken because no files will be transmit via ArtifactService in process mode.- Returns:
- The path of empty RetrievalToken.
- Throws:
IOException
-
-