Python task specifies path execution update
This commit is contained in:
parent
cd8b51adbf
commit
10ba69db5d
|
|
@ -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)){
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue