ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [32/50] [abbrv] ambari git commit: AMBARI-22234 Optimizing Ranger KMS imports (mugdha)
Date Thu, 19 Oct 2017 12:55:18 GMT
AMBARI-22234 Optimizing Ranger KMS imports (mugdha)


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

Branch: refs/heads/branch-3.0-perf
Commit: d6cd303d0207ac6ffcdbc16d129758bba9494423
Parents: e19029c
Author: Mugdha Varadkar <mugdha@apache.org>
Authored: Tue Oct 17 11:22:05 2017 +0530
Committer: Mugdha Varadkar <mugdha@apache.org>
Committed: Tue Oct 17 11:24:13 2017 +0530

----------------------------------------------------------------------
 .../0.5.0.2.3/package/scripts/kms_server.py     | 21 ++++++++++----------
 .../1.0.0.3.0/package/scripts/kms_server.py     | 19 +++++++++---------
 2 files changed, 21 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d6cd303d/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
index fcf2478..0b37489 100755
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
@@ -27,9 +27,10 @@ from resource_management.libraries.functions.format import format
 from resource_management.core.logger import Logger
 from resource_management.core import shell
 from resource_management.libraries.functions.default import default
-from kms import kms, setup_kms_db, setup_java_patch, enable_kms_plugin, setup_kms_jce, update_password_configs
 from kms_service import kms_service
 
+import kms
+
 class KmsServer(Script):
 
   def install(self, env):
@@ -44,9 +45,9 @@ class KmsServer(Script):
       sudo = True
     )
 
-    setup_kms_db()
+    kms.setup_kms_db()
     self.configure(env)
-    setup_java_patch()
+    kms.setup_java_patch()
 
   def stop(self, env, upgrade_type=None):
     import params
@@ -63,9 +64,9 @@ class KmsServer(Script):
 
     env.set_params(params)
     self.configure(env)
-    enable_kms_plugin()
-    setup_kms_jce()
-    update_password_configs()
+    kms.enable_kms_plugin()
+    kms.setup_kms_jce()
+    kms.update_password_configs()
     kms_service(action = 'start', upgrade_type=upgrade_type)
 
   def status(self, env):
@@ -87,15 +88,15 @@ class KmsServer(Script):
     import params
 
     env.set_params(params)
-    kms()
+    kms.kms()
 
   def pre_upgrade_restart(self, env, upgrade_type=None):
     import params
     env.set_params(params)
 
     stack_select.select_packages(params.version)
-    kms(upgrade_type=upgrade_type)
-    setup_java_patch()
+    kms.kms(upgrade_type=upgrade_type)
+    kms.setup_java_patch()
 
   def setup_ranger_kms_database(self, env):
     import params
@@ -107,7 +108,7 @@ class KmsServer(Script):
 
     stack_version = upgrade_stack[1]
     Logger.info(format('Setting Ranger KMS database schema, using version {stack_version}'))
-    setup_kms_db(stack_version=stack_version)
+    kms.setup_kms_db(stack_version=stack_version)
     
   def get_log_folder(self):
     import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/d6cd303d/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
index 4c313c4..4708da1 100755
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py
@@ -27,10 +27,11 @@ from resource_management.libraries.functions.format import format
 from resource_management.core.logger import Logger
 from resource_management.core import shell
 from resource_management.libraries.functions.default import default
-from kms import kms, setup_kms_db, setup_java_patch, enable_kms_plugin, setup_kms_jce
 from kms_service import kms_service
 import upgrade
 
+import kms
+
 class KmsServer(Script):
 
   def install(self, env):
@@ -38,9 +39,9 @@ class KmsServer(Script):
     import params
     env.set_params(params)
 
-    setup_kms_db()
+    kms.setup_kms_db()
     self.configure(env)
-    setup_java_patch()
+    kms.setup_java_patch()
 
   def stop(self, env, upgrade_type=None):
     import params
@@ -57,8 +58,8 @@ class KmsServer(Script):
 
     env.set_params(params)
     self.configure(env)
-    enable_kms_plugin()
-    setup_kms_jce()
+    kms.enable_kms_plugin()
+    kms.setup_kms_jce()
     kms_service(action = 'start', upgrade_type=upgrade_type)
 
   def status(self, env):
@@ -80,15 +81,15 @@ class KmsServer(Script):
     import params
 
     env.set_params(params)
-    kms()
+    kms.kms()
 
   def pre_upgrade_restart(self, env, upgrade_type=None):
     import params
     env.set_params(params)
 
     upgrade.prestart(env)
-    kms(upgrade_type=upgrade_type)
-    setup_java_patch()
+    kms.kms(upgrade_type=upgrade_type)
+    kms.setup_java_patch()
 
   def setup_ranger_kms_database(self, env):
     import params
@@ -100,7 +101,7 @@ class KmsServer(Script):
 
     stack_version = upgrade_stack[1]
     Logger.info(format('Setting Ranger KMS database schema, using version {stack_version}'))
-    setup_kms_db(stack_version=stack_version)
+    kms.setup_kms_db(stack_version=stack_version)
 
   def get_log_folder(self):
     import params


Mime
View raw message