ask for more ram in am

This commit is contained in:
tqchen 2015-03-15 23:14:56 -07:00
parent b2505e3d6f
commit e552ac401e
2 changed files with 7 additions and 5 deletions

View File

@ -216,12 +216,14 @@ public class ApplicationMaster {
assert (killedTasks.size() + finishedTasks.size() == numTasks);
success = finishedTasks.size() == numTasks;
LOG.info("Application completed. Stopping running containers");
if (success) {
nmClient.stop();
}
diagnostics = "Diagnostics." + ", num_tasks" + this.numTasks
+ ", finished=" + this.finishedTasks.size() + ", failed="
+ this.killedTasks.size() + "\n" + this.abortDiagnosis;
if (success) {
nmClient.stop();
} else {
throw new Exception("Application not successful" + diagnostics);
}
LOG.info(diagnostics);
} catch (Exception e) {
diagnostics = e.toString();

View File

@ -198,7 +198,7 @@ public class Client {
amContainer.setLocalResources(this.setupCacheFiles(appId));
amContainer.setEnvironment(this.getEnvironment());
String cmd = "$JAVA_HOME/bin/java"
+ " -Xmx256M"
+ " -Xmx900M"
+ " org.apache.hadoop.yarn.rabit.ApplicationMaster"
+ this.cacheFileArg + ' ' + this.appArgs + " 1>"
+ ApplicationConstants.LOG_DIR_EXPANSION_VAR + "/stdout"
@ -208,7 +208,7 @@ public class Client {
// Set up resource type requirements for ApplicationMaster
Resource capability = Records.newRecord(Resource.class);
capability.setMemory(256);
capability.setMemory(1024);
capability.setVirtualCores(1);
LOG.info("jobname=" + this.jobName + ",username=" + this.userName);