ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-18184 - Hive Metastore restart failed during EU with 'Internal credentials cache error' while running kinit (jonathanhurley)
Date Thu, 18 Aug 2016 17:01:55 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk d3bac1d45 -> 78886384b


AMBARI-18184 - Hive Metastore restart failed during EU with 'Internal credentials cache error'
while running kinit (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 78886384b075f5e0108b587dbf1760d29848641d
Parents: d3bac1d
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Wed Aug 17 10:56:40 2016 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Thu Aug 18 13:01:44 2016 -0400

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/hive_metastore.py    | 11 ++++++++---
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py      |  3 ++-
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/78886384/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
index 772eff8..17bf581 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
@@ -181,6 +181,7 @@ class HiveMetastoreDefault(HiveMetastore):
     Should not be invoked for a DOWNGRADE; Metastore only supports schema upgrades.
     """
     Logger.info("Upgrading Hive Metastore Schema")
+    import status_params
     import params
     env.set_params(params)
 
@@ -189,9 +190,13 @@ class HiveMetastoreDefault(HiveMetastore):
     self.configure(env)
 
     if params.security_enabled:
-      kinit_command=format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};
")
-      Execute(kinit_command,user=params.smokeuser)
-
+      cached_kinit_executor(status_params.kinit_path_local,
+        status_params.hive_user,
+        params.hive_metastore_keytab_path,
+        params.hive_metastore_principal,
+        status_params.hostname,
+        status_params.tmp_dir)
+      
     # ensure that the JDBC drive is present for the schema tool; if it's not
     # present, then download it first
     if params.hive_jdbc_driver in params.hive_jdbc_drivers_list:

http://git-wip-us.apache.org/repos/asf/ambari/blob/78886384/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 37e2426..1cd58c3 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -341,7 +341,8 @@ fs_root = config['configurations']['core-site']['fs.defaultFS']
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 
 kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths',
None))
-hive_metastore_keytab_path =  config['configurations']['hive-site']['hive.metastore.kerberos.keytab.file']
+hive_metastore_keytab_path = config['configurations']['hive-site']['hive.metastore.kerberos.keytab.file']
+hive_metastore_principal = config['configurations']['hive-site']['hive.metastore.kerberos.principal']
 
 hive_server2_keytab = config['configurations']['hive-site']['hive.server2.authentication.kerberos.keytab']
 


Mime
View raw message