Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 38d421561 -> 2bfc58203


AMBARI-21125. Ambari STS2 checker should use principal in secure cluster 
(Mingjie Tang via rlevas)


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

Branch: refs/heads/branch-2.5
Commit: 2bfc582037d23a6d573f102cfecc3f0c77d31bb5
Parents: 38d4215
Author: Mingjie Tang <mt...@hortonworks.com>
Authored: Thu May 25 15:59:49 2017 -0400
Committer: Toader, Sebastian <stoa...@hortonworks.com>
Committed: Wed Aug 9 17:05:17 2017 +0200

----------------------------------------------------------------------
 .../1.2.1/package/scripts/alerts/alert_spark_thrift_port.py     | 5 ++++-
 .../2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py    | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2bfc5820/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
index 503360e..93a2de8 100644
--- 
a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
+++ 
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
@@ -128,7 +128,10 @@ def execute(configurations={}, parameters={}, 
host_name=None):
         if host_name is None:
             host_name = socket.getfqdn()
 
-        beeline_url = ['jdbc:hive2://{host_name}:{port}/', 
"transportMode={transport_mode}"]
+        if security_enabled:
+            beeline_url = 
["'jdbc:hive2://{host_name}:{port}/default;principal={hive_principal}'","transportMode={transport_mode}"]
+        else:
+            beeline_url = 
["'jdbc:hive2://{host_name}:{port}/default'","transportMode={transport_mode}"]
         # append url according to used transport
 
         beeline_cmd = os.path.join(spark_home, "bin", "beeline")

http://git-wip-us.apache.org/repos/asf/ambari/blob/2bfc5820/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
index 12d2cda..1ce4aca 100644
--- 
a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
+++ 
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
@@ -129,7 +129,10 @@ def execute(configurations={}, parameters={}, 
host_name=None):
         if host_name is None:
             host_name = socket.getfqdn()
 
-        beeline_url = ['jdbc:hive2://{host_name}:{port}/', 
"transportMode={transport_mode}"]
+        if security_enabled:
+            beeline_url = 
["'jdbc:hive2://{host_name}:{port}/default;principal={hive_principal}'","transportMode={transport_mode}"]
+        else:
+            beeline_url = 
["'jdbc:hive2://{host_name}:{port}/default'","transportMode={transport_mode}"]
         # append url according to used transport
 
         beeline_cmd = os.path.join(spark_home, "bin", "beeline")

Reply via email to