@Internal public abstract class AbstractPythonEnvironmentManager extends Object implements PythonEnvironmentManager
Modifier and Type | Class and Description |
---|---|
static class |
AbstractPythonEnvironmentManager.PythonLeasedResource
Python lease resource which includes environment variables and working directory of execution
python environment.
|
Modifier and Type | Field and Description |
---|---|
protected PythonDependencyInfo |
dependencyInfo |
static String |
PYFLINK_GATEWAY_DISABLED |
static String |
PYTHON_ARCHIVES_DIR |
static String |
PYTHON_FILES_DIR |
static String |
PYTHON_REQUIREMENTS_CACHE |
static String |
PYTHON_REQUIREMENTS_DIR |
static String |
PYTHON_REQUIREMENTS_FILE |
static String |
PYTHON_REQUIREMENTS_INSTALL_DIR |
static String |
PYTHON_WORKING_DIR |
protected AbstractPythonEnvironmentManager.PythonLeasedResource |
resource |
Constructor and Description |
---|
AbstractPythonEnvironmentManager(PythonDependencyInfo dependencyInfo,
String[] tmpDirectories,
Map<String,String> systemEnv,
JobID jobID) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<String,String> |
constructEnvironmentVariables(String baseDirectory)
Constructs the environment variables which is used to launch the python UDF worker.
|
String |
getBaseDirectory() |
Map<String,String> |
getPythonEnv() |
void |
open()
Initialize the environment manager.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createEnvironment
protected transient AbstractPythonEnvironmentManager.PythonLeasedResource resource
protected final PythonDependencyInfo dependencyInfo
@VisibleForTesting public static final String PYTHON_REQUIREMENTS_DIR
@VisibleForTesting public static final String PYTHON_REQUIREMENTS_FILE
@VisibleForTesting public static final String PYTHON_REQUIREMENTS_CACHE
@VisibleForTesting public static final String PYTHON_REQUIREMENTS_INSTALL_DIR
@VisibleForTesting public static final String PYTHON_WORKING_DIR
@VisibleForTesting public static final String PYTHON_FILES_DIR
@VisibleForTesting public static final String PYTHON_ARCHIVES_DIR
@VisibleForTesting public static final String PYFLINK_GATEWAY_DISABLED
public void open() throws Exception
PythonEnvironmentManager
open
in interface PythonEnvironmentManager
Exception
public void close() throws Exception
close
in interface AutoCloseable
Exception
@VisibleForTesting public String getBaseDirectory()
@VisibleForTesting public Map<String,String> getPythonEnv()
@VisibleForTesting public Map<String,String> constructEnvironmentVariables(String baseDirectory) throws IOException
IOException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.