ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkam...@apache.org
Subject ambari git commit: AMBARI-20539. Interpreters that are not listed under "zeppelin.interpreter.group.order" in zeppelin-site.xml should not get installed. (Prabhjyot Singh via r-kamath)
Date Mon, 27 Mar 2017 09:47:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk d8693986a -> b7d5ef70a


AMBARI-20539. Interpreters that are not listed under "zeppelin.interpreter.group.order" in
zeppelin-site.xml should not get installed. (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: b7d5ef70afec253f4269ac8a6073c1d5a4164968
Parents: d869398
Author: Renjith Kamath <renjith.kamath@gmail.com>
Authored: Mon Mar 27 15:16:00 2017 +0530
Committer: Renjith Kamath <renjith.kamath@gmail.com>
Committed: Mon Mar 27 15:16:00 2017 +0530

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py    | 16 ++++++++++------
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py    |  5 ++++-
 2 files changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7d5ef70/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index c3521c5..2b21f8f 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -81,7 +81,7 @@ class Master(Script):
                         )
 
     spark_deps_full_path = self.get_zeppelin_spark_dependencies()[0]
-    spark_dep_file_name = os.path.basename(spark_deps_full_path);
+    spark_dep_file_name = os.path.basename(spark_deps_full_path)
 
     params.HdfsResource(params.spark_jar_dir + "/" + spark_dep_file_name,
                         type="file",
@@ -316,11 +316,6 @@ class Master(Script):
     config_data = self.get_interpreter_settings()
     interpreter_settings = config_data['interpreterSettings']
 
-    for setting_key in interpreter_settings.keys():
-      interpreter = interpreter_settings[setting_key]
-      if not (interpreter['group'] in params.zeppelin_interpreter):
-        del interpreter_settings[setting_key]
-
     if 'spark2-defaults' in params.config['configurations']:
       spark2_config = self.get_spark2_interpreter_config()
       config_id = spark2_config["id"]
@@ -331,6 +326,15 @@ class Master(Script):
       config_id = livy2_config["id"]
       interpreter_settings[config_id] = livy2_config
 
+    if params.zeppelin_interpreter:
+      settings_to_delete = []
+      for settings_key, interpreter in interpreter_settings.items():
+        if interpreter['group'] not in params.zeppelin_interpreter:
+          settings_to_delete.append(settings_key)
+
+      for key in settings_to_delete:
+        del interpreter_settings[key]
+
     hive_interactive_properties_key = 'hive_interactive'
     for setting_key in interpreter_settings.keys():
       interpreter = interpreter_settings[setting_key]

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7d5ef70/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 6ba2a87..2340df9 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -84,7 +84,10 @@ stack_name = default("/hostLevelParams/stack_name", None)
 
 # params from zeppelin-config
 zeppelin_port = str(config['configurations']['zeppelin-config']['zeppelin.server.port'])
-zeppelin_interpreter = str(config['configurations']['zeppelin-config']['zeppelin.interpreter.group.order']).split(",")
+zeppelin_interpreter = None
+if 'zeppelin.interpreter.group.order' in config['configurations']['zeppelin-config']:
+  zeppelin_interpreter = str(config['configurations']['zeppelin-config']
+                             ['zeppelin.interpreter.group.order']).split(",")
 
 # params from zeppelin-env
 zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user']


Mime
View raw message