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-18142. Define keytab/principal for Spark Thrift Server - addendum patch (Jianfeng Zhang via smohanty)
Date Thu, 18 Aug 2016 20:59:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0e5fb8ee8 -> a57daad47


AMBARI-18142. Define keytab/principal for Spark Thrift Server - addendum patch (Jianfeng Zhang
via smohanty)


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

Branch: refs/heads/trunk
Commit: a57daad47194438f5df10414130aa18effc3446e
Parents: 0e5fb8e
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Thu Aug 18 13:29:19 2016 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Thu Aug 18 13:29:19 2016 -0700

----------------------------------------------------------------------
 .../SPARK/1.2.1/package/scripts/spark_service.py                | 5 +++++
 .../SPARK2/2.0.0/package/scripts/spark_service.py               | 5 +++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a57daad4/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_service.py
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_service.py
index d2f5ef9..82a010a 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_service.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_service.py
@@ -76,6 +76,11 @@ def spark_service(name, upgrade_type=None, action=None):
         raise
 
     elif name == 'sparkthriftserver':
+      if params.security_enabled:
+        hive_principal = params.hive_kerberos_principal
+        hive_kinit_cmd = format("{kinit_path_local} -kt {hive_kerberos_keytab} {hive_principal};
")
+        Execute(hive_kinit_cmd, user=params.hive_user)
+
       thriftserver_no_op_test = format(
       'ls {spark_thrift_server_pid_file} >/dev/null 2>&1 && ps -p `cat
{spark_thrift_server_pid_file}` >/dev/null 2>&1')
       try:

http://git-wip-us.apache.org/repos/asf/ambari/blob/a57daad4/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
index 308dd3d..590b299 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_service.py
@@ -96,6 +96,11 @@ def spark_service(name, upgrade_type=None, action=None):
         raise
 
     elif name == 'sparkthriftserver':
+      if params.security_enabled:
+        hive_principal = params.hive_kerberos_principal
+        hive_kinit_cmd = format("{kinit_path_local} -kt {hive_kerberos_keytab} {hive_principal};
")
+        Execute(hive_kinit_cmd, user=params.hive_user)
+
       thriftserver_no_op_test = format(
       'ls {spark_thrift_server_pid_file} >/dev/null 2>&1 && ps -p `cat
{spark_thrift_server_pid_file}` >/dev/null 2>&1')
       try:


Mime
View raw message