add command back

This commit is contained in:
tqchen 2015-03-12 22:48:30 -07:00
parent 07740003b8
commit ed3bee84c2

View File

@ -274,10 +274,17 @@ public class ApplicationMaster {
task.containerRequest = null; task.containerRequest = null;
ContainerLaunchContext ctx = Records ContainerLaunchContext ctx = Records
.newRecord(ContainerLaunchContext.class); .newRecord(ContainerLaunchContext.class);
String hadoop = "hadoop";
if (System.getenv("HADOOP_HOME") != null) {
hadoop = "${HADOOP_HOME}/bin/hadoop";
} else if (System.getenv("HADOOP_PREFIX") != null) {
hadoop = "${HADOOP_PREFIX}/bin/hadoop";
}
String cmd = String cmd =
// use this to setup CLASSPATH correctly for libhdfs // use this to setup CLASSPATH correctly for libhdfs
// "CLASSPATH=${CLASSPATH}:`" + hadoop + " classpath --glob` " "CLASSPATH=${CLASSPATH}:`" + hadoop + " classpath --glob` "
this.command + " 1>" + this.command + " 1>"
+ ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout"
+ " 2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR + " 2>" + ApplicationConstants.LOG_DIR_EXPANSION_VAR
+ "/stderr"; + "/stderr";