You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by li...@apache.org on 2016/01/18 02:15:17 UTC
hive git commit: HIVE-12611: Make sure spark.yarn.queue is effective
and takes the value from mapreduce.job.queuename if given [Spark Branch] (Rui
reviewed by Xuefu)
Repository: hive
Updated Branches:
refs/heads/spark 814bdaa52 -> ce7ddc80c
HIVE-12611: Make sure spark.yarn.queue is effective and takes the value from mapreduce.job.queuename if given [Spark Branch] (Rui reviewed by Xuefu)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ce7ddc80
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ce7ddc80
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ce7ddc80
Branch: refs/heads/spark
Commit: ce7ddc80c380d2a3e6aab1a960714027289e3bfb
Parents: 814bdaa
Author: Rui Li <ru...@intel.com>
Authored: Mon Jan 18 09:14:56 2016 +0800
Committer: Rui Li <ru...@intel.com>
Committed: Mon Jan 18 09:14:56 2016 +0800
----------------------------------------------------------------------
.../hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/ce7ddc80/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
index a832bf6..993d02b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
@@ -174,6 +174,15 @@ public class HiveSparkClientFactory {
classes.add(HiveKey.class.getName());
sparkConf.put("spark.kryo.classesToRegister", Joiner.on(",").join(classes));
+ // set yarn queue name
+ final String sparkQueueNameKey = "spark.yarn.queue";
+ if (sparkMaster.startsWith("yarn") && hiveConf.get(sparkQueueNameKey) == null) {
+ String queueName = hiveConf.get("mapreduce.job.queuename");
+ if (queueName != null) {
+ sparkConf.put(sparkQueueNameKey, queueName);
+ }
+ }
+
return sparkConf;
}