use of org.apache.flink.table.functions.python.PythonEnv in project flink by apache.
the class AbstractExternalPythonFunctionOperator method createPythonEnvironmentManager.
@Override
protected ProcessPythonEnvironmentManager createPythonEnvironmentManager() {
PythonDependencyInfo dependencyInfo = PythonDependencyInfo.create(pythonConfig, getRuntimeContext().getDistributedCache());
PythonEnv pythonEnv = getPythonEnv();
if (pythonEnv.getExecType() == PythonEnv.ExecType.PROCESS) {
return new ProcessPythonEnvironmentManager(dependencyInfo, getContainingTask().getEnvironment().getTaskManagerInfo().getTmpDirectories(), new HashMap<>(System.getenv()), getRuntimeContext().getJobId());
} else {
throw new UnsupportedOperationException(String.format("Execution type '%s' is not supported.", pythonEnv.getExecType()));
}
}
Aggregations