ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkam...@apache.org
Subject [2/5] 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 gauravn7)
Date Tue, 04 Apr 2017 06:52:57 GMT
AMBARI-20539. Interpreters that are not listed under zeppelin.interpreter.group.order in zeppelin-site.xml
should not get installed. (Prabhjyot Singh via gauravn7)


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

Branch: refs/heads/branch-2.5
Commit: af55ef7a8e5fe986660a7c741c18ab9e9d1cabd4
Parents: f6030f5
Author: Gaurav Nagar <grvngr@gmail.com>
Authored: Fri Mar 24 19:49:38 2017 +0530
Committer: Renjith Kamath <renjith.kamath@gmail.com>
Committed: Tue Apr 4 12:20:38 2017 +0530

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml      | 7 +++++++
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py              | 5 +++++
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py              | 1 +
 ambari-server/src/test/python/stacks/2.6/configs/default.json | 3 ++-
 4 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 039c701..85f1859 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -93,6 +93,13 @@
     <on-ambari-upgrade add="true"/>
   </property>
   <property>
+    <name>zeppelin.interpreter.group.order</name>
+    <value>spark,angular,jdbc,livy,md,sh</value>
+    <description>Comma separated interpreter configurations. First interpreter become
default
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
     <name>zeppelin.interpreter.connect.timeout</name>
     <value>30000</value>
     <description>Interpreter process connect timeout in msec.</description>

http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/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 be2f96c..143d618 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
@@ -301,6 +301,11 @@ 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"]

http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/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 9dfdea6..8ba1528 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,6 +84,7 @@ 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(",")
 
 # params from zeppelin-env
 zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user']

http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/ambari-server/src/test/python/stacks/2.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.6/configs/default.json b/ambari-server/src/test/python/stacks/2.6/configs/default.json
index a1f89ce..54000e6 100644
--- a/ambari-server/src/test/python/stacks/2.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.6/configs/default.json
@@ -335,7 +335,8 @@
 "zeppelin-config": {
             "zeppelin.server.port": "9995", 
             "zeppelin.ssl.truststore.password": "change me", 
-            "zeppelin.interpreters": "org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.jdbc.JDBCInterpreter,org.apache.zeppelin.phoenix.PhoenixInterpreter,org.apache.zeppelin.livy.LivySparkInterpreter,org.apache.zeppelin.livy.LivyPySparkInterpreter,org.apache.zeppelin.livy.LivySparkRInterpreter,org.apache.zeppelin.livy.LivySparkSQLInterpreter",

+            "zeppelin.interpreters": "org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.jdbc.JDBCInterpreter,org.apache.zeppelin.phoenix.PhoenixInterpreter,org.apache.zeppelin.livy.LivySparkInterpreter,org.apache.zeppelin.livy.LivyPySparkInterpreter,org.apache.zeppelin.livy.LivySparkRInterpreter,org.apache.zeppelin.livy.LivySparkSQLInterpreter",
+            "zeppelin.interpreter.group.order": "spark,angular,jdbc,livy,md,sh",
             "zeppelin.ssl.truststore.path": "conf/truststore", 
             "zeppelin.notebook.dir": "notebook", 
             "zeppelin.ssl.keystore.password": "change me", 


Mime
View raw message