You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/04/30 10:44:54 UTC
ambari git commit: AMBARI-10859. hive-site.xml packaged under
/etc/spark/conf is not correct (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk a73782d52 -> 24f2548ae
AMBARI-10859. hive-site.xml packaged under /etc/spark/conf is not correct (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/24f2548a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24f2548a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24f2548a
Branch: refs/heads/trunk
Commit: 24f2548ae0085d137b94bc1c59b4ae09c2806f07
Parents: a73782d
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Apr 30 11:44:49 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Apr 30 11:44:49 2015 +0300
----------------------------------------------------------------------
.../SPARK/1.2.0.2.2/package/scripts/params.py | 19 +++++++++++++++++++
.../1.2.0.2.2/package/scripts/setup_spark.py | 2 +-
2 files changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/24f2548a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py
index c521b65..bda4a76 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/params.py
@@ -122,8 +122,27 @@ security_enabled = config['configurations']['cluster-env']['security_enabled']
kinit_path_local = functions.get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
spark_kerberos_keytab = config['configurations']['spark-defaults']['spark.history.kerberos.keytab']
spark_kerberos_principal = config['configurations']['spark-defaults']['spark.history.kerberos.principal']
+
+spark_hive_properties = {
+ 'hive.metastore.uris': config['configurations']['hive-site']['hive.metastore.uris']
+}
+
if security_enabled:
spark_principal = spark_kerberos_principal.replace('_HOST',spark_history_server_host.lower())
+
+ if is_hive_installed:
+ spark_hive_properties += {
+ 'hive.metastore.sasl.enabled': str(config['configurations']['hive-site']['hive.metastore.sasl.enabled']).lower(),
+ 'hive.metastore.kerberos.keytab.file': config['configurations']['hive-site']['hive.metastore.kerberos.keytab.file'],
+ 'hive.server2.authentication.spnego.principal': config['configurations']['hive-site']['hive.server2.authentication.spnego.principal'],
+ 'hive.server2.authentication.spnego.keytab': config['configurations']['hive-site']['hive.server2.authentication.spnego.keytab'],
+ 'hive.metastore.kerberos.principal': config['configurations']['hive-site']['hive.metastore.kerberos.principal'],
+ 'hive.server2.authentication.kerberos.principal': config['configurations']['hive-site']['hive.server2.authentication.kerberos.principal'],
+ 'hive.server2.authentication.kerberos.keytab': config['configurations']['hive-site']['hive.server2.authentication.kerberos.keytab'],
+ 'hive.security.authorization.enabled': spark_hive_sec_authorization_enabled,
+ 'hive.server2.enable.doAs': str(config['configurations']['hive-site']['hive.server2.enable.doAs']).lower()
+ }
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/24f2548a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/setup_spark.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/setup_spark.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/setup_spark.py
index d8fbc8c..80d6bbc 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/setup_spark.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.0.2.2/package/scripts/setup_spark.py
@@ -78,7 +78,7 @@ def setup_spark(env, type, action = None):
if params.is_hive_installed:
XmlConfig("hive-site.xml",
conf_dir=params.spark_conf,
- configurations=params.config['configurations']['hive-site'],
+ configurations=params.spark_hive_properties,
owner=params.spark_user,
group=params.spark_group,
mode=0644)