This is an automated email from the ASF dual-hosted git repository. mgergely pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new 9de1314 AMBARI-24169 Hive Upgrade should run kinit before table conversion if needed 9de1314 is described below commit 9de13143c39224476526429e3a296dd970a28228 Author: Miklos Gergely <mgerg...@hortonworks.com> AuthorDate: Fri Jun 22 15:28:21 2018 +0200 AMBARI-24169 Hive Upgrade should run kinit before table conversion if needed --- .../common-services/HIVE/0.12.0.2.0/package/scripts/pre_upgrade.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/pre_upgrade.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/pre_upgrade.py index 0e241c8..f8b2365 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/pre_upgrade.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/pre_upgrade.py @@ -87,8 +87,12 @@ class HivePreUpgrade(Script): source_dir = format("/usr/hdp/{source_version}"); target_dir = format("/usr/hdp/{target_version}") + if params.security_enabled: + hive_kinit_cmd = format("{kinit_path_local} -kt {hive_server2_keytab} {hive_principal}; ") + Execute(hive_kinit_cmd, user = params.hive_user) + classpath = format("{source_dir}/hive2/lib/*:{source_dir}/hadoop/*:{source_dir}/hadoop/lib/*:{source_dir}/hadoop-mapreduce/*:{source_dir}/hadoop-mapreduce/lib/*:{target_dir}/hive/lib/hive-pre-upgrade.jar:{source_dir}/hive/conf") - cmd = format("{java64_home}/bin/java -cp {classpath} org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool -execute") + cmd = format("{java64_home}/bin/java -Djavax.security.auth.useSubjectCredsOnly=false -cp {classpath} org.apache.hadoop.hive.upgrade.acid.PreUpgradeTool -execute") Execute(cmd, user = "hive") if __name__ == "__main__":