ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-18091. Fix Spark2 service check failure when WE is enabled (Saisai Shao via smohanty)
Date Wed, 10 Aug 2016 15:10:35 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 f8b78dfe9 -> 60baa1eb0


AMBARI-18091. Fix Spark2 service check failure when WE is enabled (Saisai Shao via smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60baa1eb
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60baa1eb
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60baa1eb

Branch: refs/heads/branch-2.4
Commit: 60baa1eb03895e9ffb4d2b2e9a71f831bae1772e
Parents: f8b78df
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Wed Aug 10 08:06:33 2016 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Wed Aug 10 08:10:22 2016 -0700

----------------------------------------------------------------------
 .../common-services/SPARK2/2.0.0/package/scripts/params.py       | 4 ++++
 .../SPARK2/2.0.0/package/scripts/service_check.py                | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/60baa1eb/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
index 8aaf209..80f2f97 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
@@ -108,9 +108,13 @@ else:
   spark_history_server_host = "localhost"
 
 # spark-defaults params
+ui_ssl_enabled = default("configurations/spark2-defaults/spark.ssl.enabled", False)
+
 spark_yarn_historyServer_address = default(spark_history_server_host, "localhost")
 
 spark_history_ui_port = config['configurations']['spark2-defaults']['spark.history.ui.port']
+if ui_ssl_enabled:
+  spark_history_ui_port = str(int(spark_history_ui_port) + 400)
 
 spark_env_sh = config['configurations']['spark2-env']['content']
 spark_log4j_properties = config['configurations']['spark2-log4j-properties']['content']

http://git-wip-us.apache.org/repos/asf/ambari/blob/60baa1eb/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
index 694f046..d9e0b1c 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
@@ -33,7 +33,8 @@ class SparkServiceCheck(Script):
       spark_kinit_cmd = format("{kinit_path_local} -kt {spark_kerberos_keytab} {spark_principal};
")
       Execute(spark_kinit_cmd, user=params.spark_user)
 
-    Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{spark_history_server_host}:{spark_history_ui_port}
| grep 200"),
+    scheme = "https" if params.ui_ssl_enabled else "http"
+    Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {scheme}://{spark_history_server_host}:{spark_history_ui_port}
| grep 200"),
       tries = 10,
       try_sleep=3,
       logoutput=True


Mime
View raw message