mikewalch closed pull request #14: fixes #13 Made YARN queue configurable
URL: https://github.com/apache/fluo-yarn/pull/14
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnEnv.java
b/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnEnv.java
index 2c76fec..c5a8629 100644
--- a/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnEnv.java
+++ b/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnEnv.java
@@ -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();
}
diff --git a/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnLauncher.java
b/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnLauncher.java
index e1b8887..e79f9dc 100644
--- a/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnLauncher.java
+++ b/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnLauncher.java
@@ -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();
diff --git
a/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnProperties.java
b/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnProperties.java
index d61dca6..990afa7 100644
--- a/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnProperties.java
+++ b/core/src/main/java/org/apache/fluo/yarn/core/FluoYarnProperties.java
@@ -30,6 +30,7 @@
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";
diff --git a/distribution/conf/fluo-yarn.properties
b/distribution/conf/fluo-yarn.properties
index 0af7bf8..c2f3546 100644
--- a/distribution/conf/fluo-yarn.properties
+++ b/distribution/conf/fluo-yarn.properties
@@ -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
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services