Package org.apache.flink.python.env
Class PythonDependencyInfo
- java.lang.Object
-
- org.apache.flink.python.env.PythonDependencyInfo
-
@Internal public final class PythonDependencyInfo extends Object
PythonDependencyInfo contains the information of third-party dependencies.
-
-
Constructor Summary
Constructors Constructor Description PythonDependencyInfo(Map<String,String> pythonFiles, String requirementsFilePath, String requirementsCacheDir, Map<String,String> archives, String pythonExec)PythonDependencyInfo(Map<String,String> pythonFiles, String requirementsFilePath, String requirementsCacheDir, Map<String,String> archives, String pythonExec, String executionMode, String pythonPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PythonDependencyInfocreate(org.apache.flink.configuration.ReadableConfig config, org.apache.flink.api.common.cache.DistributedCache distributedCache)Creates PythonDependencyInfo from GlobalJobParameters and DistributedCache.Map<String,String>getArchives()StringgetExecutionMode()StringgetPythonExec()Map<String,String>getPythonFiles()Optional<String>getPythonPath()Optional<String>getRequirementsCacheDir()Optional<String>getRequirementsFilePath()booleanisPythonExecFromArchives()Checks whether the configured python executable path is located within one of the shipped archives.
-
-
-
Method Detail
-
getPythonExec
public String getPythonExec()
-
getExecutionMode
public String getExecutionMode()
-
create
public static PythonDependencyInfo create(org.apache.flink.configuration.ReadableConfig config, org.apache.flink.api.common.cache.DistributedCache distributedCache)
Creates PythonDependencyInfo from GlobalJobParameters and DistributedCache.- Parameters:
config- The config.distributedCache- The DistributedCache object of current task.- Returns:
- The PythonDependencyInfo object that contains whole information of python dependency.
-
isPythonExecFromArchives
public boolean isPythonExecFromArchives()
Checks whether the configured python executable path is located within one of the shipped archives.This is determined by comparing the first path component of the python executable (the base directory) against the target directory names of all registered archives.
- Returns:
trueif the python executable's base directory matches an archive target directory
-
-