Repository: ambari Updated Branches: refs/heads/branch-2.1 f4b86a561 -> a5b90007e refs/heads/trunk 44e595588 -> 56c23bb65
AMBARI-14087. Spark Thrift Server shutdown after start with umask 027 (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/56c23bb6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/56c23bb6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/56c23bb6 Branch: refs/heads/trunk Commit: 56c23bb65ec4ba41dd3722e817a2905a72d093fe Parents: 44e5955 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Nov 26 15:16:01 2015 +0200 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Nov 26 15:16:01 2015 +0200 ---------------------------------------------------------------------- .../common-services/SPARK/1.2.0.2.2/package/scripts/params.py | 3 +++ .../SPARK/1.2.0.2.2/package/scripts/setup_spark.py | 5 ++--- .../test/python/stacks/2.3/SPARK/test_spark_thrift_server.py | 1 + .../src/test/python/stacks/2.3/configs/spark_default.json | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/56c23bb6/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 775974d..9f0147a 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,6 +122,9 @@ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executab spark_kerberos_keytab = config['configurations']['spark-defaults']['spark.history.kerberos.keytab'] spark_kerberos_principal = config['configurations']['spark-defaults']['spark.history.kerberos.principal'] +spark_thriftserver_hosts = default("/clusterHostInfo/spark_thriftserver_hosts", []) +has_spark_thriftserver = not len(spark_thriftserver_hosts) == 0 + # hive-site params spark_hive_properties = { 'hive.metastore.uris': config['configurations']['hive-site']['hive.metastore.uris'] http://git-wip-us.apache.org/repos/asf/ambari/blob/56c23bb6/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 945bd63..b0ca499 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 @@ -82,10 +82,9 @@ def setup_spark(env, type, action = None): group=params.spark_group, mode=0644) - # thrift server is not supported until HDP 2.3 or higher - if params.version and compare_versions(format_hdp_stack_version(params.version), '2.3.0.0') >= 0 \ - and 'spark-thrift-sparkconf' in params.config['configurations']: + if params.has_spark_thriftserver: PropertiesFile(params.spark_thrift_server_conf_file, properties = params.config['configurations']['spark-thrift-sparkconf'], + owner = params.hive_user, key_value_delimiter = " ", ) http://git-wip-us.apache.org/repos/asf/ambari/blob/56c23bb6/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py b/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py index 253c5f8..1968f3b 100644 --- a/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py +++ b/ambari-server/src/test/python/stacks/2.3/SPARK/test_spark_thrift_server.py @@ -142,6 +142,7 @@ class TestSparkThriftServer(RMFTestCase): ) self.assertResourceCalled('PropertiesFile', '/usr/hdp/current/spark-client/conf/spark-thrift-sparkconf.conf', key_value_delimiter = ' ', + owner = 'hive', properties = self.getConfig()['configurations']['spark-thrift-sparkconf'] ) http://git-wip-us.apache.org/repos/asf/ambari/blob/56c23bb6/ambari-server/src/test/python/stacks/2.3/configs/spark_default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.3/configs/spark_default.json b/ambari-server/src/test/python/stacks/2.3/configs/spark_default.json index 84cd31f..05e5ed8 100644 --- a/ambari-server/src/test/python/stacks/2.3/configs/spark_default.json +++ b/ambari-server/src/test/python/stacks/2.3/configs/spark_default.json @@ -485,7 +485,9 @@ ], "zookeeper_hosts": [ "c6401.ambari.apache.org" - ] - + ], + "spark_thriftserver_hosts": [ + "c6401.ambari.apache.org" + ] } }