add option queue

This commit is contained in:
tqchen
2015-03-15 22:38:51 -07:00
parent 5dc843cff3
commit f3e867ed97
3 changed files with 12 additions and 1 deletions

View File

@@ -1,4 +1,8 @@
#!/bin/bash
if [ ! -d bin ]; then
mkdir bin
fi
CPATH=`${HADOOP_HOME}/bin/hadoop classpath`
javac -cp $CPATH -d bin src/org/apache/hadoop/yarn/rabit/*
jar cf rabit-yarn.jar -C bin .

View File

@@ -48,6 +48,8 @@ public class Client {
private String userName = "";
// job name
private String jobName = "";
// queue
private String queue = "default";
/**
* constructor
* @throws IOException
@@ -158,6 +160,8 @@ public class Client {
this.jobName = args[++i];
} else if(args[i].equals("-tempdir")) {
this.tempdir = args[++i];
} else if(args[i].equals("-queue")) {
this.queue = args[++i];
} else {
sargs.append(" ");
sargs.append(args[i]);
@@ -210,7 +214,7 @@ public class Client {
appContext.setApplicationName(jobName + ":RABIT-YARN");
appContext.setAMContainerSpec(amContainer);
appContext.setResource(capability);
appContext.setQueue("default");
appContext.setQueue(queue);
//appContext.setUser(userName);
LOG.info("Submitting application " + appId);
yarnClient.submitApplication(appContext);