Skip to content
Permalink
Browse files
fixes #13 Made YARN queue configurable (#14)
  • Loading branch information
keith-turner authored and mikewalch committed Jan 5, 2018
1 parent 2ba874f commit 4c8198a568f0f8d3fe91c819086c93387959e7be
Showing 4 changed files with 12 additions and 0 deletions.
@@ -131,6 +131,10 @@ public int getOracleMaxMemory() {
FluoYarnProperties.ORACLE_MAX_MEMORY_MB_DEFAULT));
}

public String getYarnQueue() {
return props.getProperty(FluoYarnProperties.QUEUE_PROP, null);
}

public int getTotalInstances() {
return getOracleInstances() + getWorkerInstances();
}
@@ -125,6 +125,10 @@ public static void main(String[] args) throws Exception {
.withArguments(ORACLE_ID, oracleArgs.toArray())
.withArguments(WORKER_ID, workerArgs.toArray());

if (env.getYarnQueue() != null) {
preparer.setSchedulerQueue(env.getYarnQueue());
}

TwillController controller = preparer.start();

ResourceReport report = controller.getResourceReport();
@@ -30,6 +30,7 @@ public class FluoYarnProperties {
public static final String YARN_RESOURCE_MANAGER_DEFAULT = "localhost";
public static final String ZOOKEEPERS_DEFAULT = "localhost/fluo-yarn";
public static final String DFS_ROOT_DEFAULT = "hdfs://localhost:8020/";
public static final String QUEUE_PROP = YARN_PREFIX + ".queue";

// Worker properties
public static final String WORKER_INSTANCES_PROP = YARN_PREFIX + ".worker.instances";
@@ -32,6 +32,9 @@
## HDFS root path. Should be prefixed with 'fs.defaultFS' property in Hadoop's core-site.xml
#fluo.yarn.dfs.root=hdfs://localhost:8020/

## Optionally specify the YARN Queue to launch application in
#fluo.yarn.queue=someQ

## Oracle properties
## -----------------
## Number of oracle yarn instances

0 comments on commit 4c8198a

Please sign in to comment.