Browse Source

Merge pull request #65 from qiaozhanwei/branch-1.0.0

Python task specifies path execution update
pull/2/head
乔占卫 6 years ago committed by GitHub
parent
commit
7cb5890d54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      escheduler-server/src/main/java/cn/escheduler/server/worker/task/PythonCommandExecutor.java
  2. 12
      script/env/escheduler_env.py

2
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)){

12
script/env/escheduler_env.py vendored

@ -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)
Loading…
Cancel
Save