YARN-8698. [Submarine] Failed to reset Hadoop home environment when submitting a submarine job. (Zac Zhou via wangda)

Change-Id: If7fdc11fcc4e49bed2186ded76cd69164f34f502
This commit is contained in:
Wangda Tan 2018-09-09 17:45:31 -07:00
parent 8944407d93
commit de85f841da

View File

@ -125,6 +125,7 @@ private void addHdfsClassPathIfNeeded(RunJobParameters parameters,
fw.append("export HADOOP_HOME=\n");
fw.append("export HADOOP_YARN_HOME=\n");
fw.append("export HADOOP_HDFS_HOME=" + hdfsHome + "\n");
fw.append("export HADOOP_COMMON_HOME=" + hdfsHome + "\n");
} else{
lackingEnvs = true;
}
@ -170,10 +171,12 @@ private void addHdfsClassPathIfNeeded(RunJobParameters parameters,
// DEBUG
if (SubmarineLogs.isVerbose()) {
fw.append("echo $CLASSPATH\n");
fw.append("echo $JAVA_HOME\n");
fw.append("echo $LD_LIBRARY_PATH\n");
fw.append("echo $HADOOP_HDFS_HOME\n");
fw.append("echo \"CLASSPATH:$CLASSPATH\"\n");
fw.append("echo \"HADOOP_CONF_DIR:$HADOOP_CONF_DIR\"\n");
fw.append("echo \"HADOOP_TOKEN_FILE_LOCATION:$HADOOP_TOKEN_FILE_LOCATION\"\n");
fw.append("echo \"JAVA_HOME:$JAVA_HOME\"\n");
fw.append("echo \"LD_LIBRARY_PATH:$LD_LIBRARY_PATH\"\n");
fw.append("echo \"HADOOP_HDFS_HOME:$HADOOP_HDFS_HOME\"\n");
}
}