From 10ba69db5d19614c75c35aec2ec531d8624f3154 Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Tue, 16 Apr 2019 18:05:14 +0800 Subject: [PATCH] Python task specifies path execution update --- .../server/worker/task/PythonCommandExecutor.java | 2 +- script/env/escheduler_env.py | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 script/env/escheduler_env.py diff --git a/escheduler-server/src/main/java/cn/escheduler/server/worker/task/PythonCommandExecutor.java b/escheduler-server/src/main/java/cn/escheduler/server/worker/task/PythonCommandExecutor.java index 0374df37d4..94caffe596 100644 --- a/escheduler-server/src/main/java/cn/escheduler/server/worker/task/PythonCommandExecutor.java +++ b/escheduler-server/src/main/java/cn/escheduler/server/worker/task/PythonCommandExecutor.java @@ -86,7 +86,7 @@ public class PythonCommandExecutor extends AbstractCommandExecutor { @Override protected String commandType() { - String envPath = System.getProperty("user.dir") + Constants.SINGLE_SLASH + "conf "+ + String envPath = System.getProperty("user.dir") + Constants.SINGLE_SLASH + "conf"+ Constants.SINGLE_SLASH +"env" + Constants.SINGLE_SLASH + Constants.ESCHEDULER_ENV_SH; String pythonHome = getPythonHome(envPath); if (StringUtils.isEmpty(pythonHome)){ diff --git a/script/env/escheduler_env.py b/script/env/escheduler_env.py deleted file mode 100644 index e1d0afef4a..0000000000 --- a/script/env/escheduler_env.py +++ /dev/null @@ -1,12 +0,0 @@ -import os - -HADOOP_HOME="/opt/soft/hadoop" -SPARK_HOME1="/opt/soft/spark1" -SPARK_HOME2="/opt/soft/spark2" -PYTHON_HOME="/opt/soft/python" -JAVA_HOME="/opt/soft/java" -HIVE_HOME="/opt/soft/hive" -PATH=os.environ['PATH'] -PATH="%s/bin:%s/bin:%s/bin:%s/bin:%s/bin:%s/bin:%s"%(HIVE_HOME,HADOOP_HOME,SPARK_HOME1,SPARK_HOME2,JAVA_HOME,PYTHON_HOME,PATH) - -os.putenv('PATH','%s'%PATH) \ No newline at end of file