ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gna...@apache.org
Subject ambari git commit: AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(Prabhjyot Singh via gauravn7)
Date Wed, 30 Aug 2017 05:53:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk ae80b6e7c -> 6b052390c


AMBARI-21814. On installation of new services on Ambari, Zeppelin should configure new interpreters.(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/6b052390
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b052390
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b052390

Branch: refs/heads/trunk
Commit: 6b052390c3398c6f7fa1a706c3802ce7adf28cb9
Parents: ae80b6e
Author: Gaurav Nagar <grvngr@gmail.com>
Authored: Wed Aug 30 11:23:31 2017 +0530
Committer: Gaurav Nagar <grvngr@gmail.com>
Committed: Wed Aug 30 11:23:31 2017 +0530

----------------------------------------------------------------------
 .../0.6.0.2.5/configuration/zeppelin-config.xml   |  6 ++++++
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 18 +++++++++++++++++-
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py  |  4 ++++
 .../0.6.0.3.0/configuration/zeppelin-config.xml   | 13 +++++++++++++
 4 files changed, 40 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/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 6f16a98..03ad5f7 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
@@ -199,4 +199,10 @@
     <description>Size in characters of the maximum text message to be received by websocket.
Defaults to 1024000</description>
     <on-ambari-upgrade add="true"/>
   </property>
+  <property>
+    <name>zeppelin.interpreter.config.upgrade</name>
+    <value>true</value>
+    <description>If this is set to true, on every restart of Zeppelin server default
interpreter parameters will be reset</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/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 7f506c5..62ed825 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
@@ -214,8 +214,8 @@ class Master(Script):
     if not glob.glob(params.conf_dir + "/interpreter.json") and \
       not os.path.exists(params.conf_dir + "/interpreter.json"):
       self.create_interpreter_json()
-      self.update_zeppelin_interpreter()
 
+    self.update_zeppelin_interpreter()
     self.update_kerberos_properties()
 
     Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> '
@@ -235,6 +235,20 @@ class Master(Script):
         pid_file = ''
     check_process_status(pid_file)
 
+  def reset_interpreter_settings(self):
+    import json
+    import interpreter_json_template
+    interpreter_json_template = json.loads(interpreter_json_template.template)['interpreterSettings']
+    config_data = self.get_interpreter_settings()
+    interpreter_settings = config_data['interpreterSettings']
+
+    for setting_key in interpreter_json_template.keys():
+      if setting_key not in interpreter_settings:
+        interpreter_settings[setting_key] = interpreter_json_template[
+          setting_key]
+
+    self.set_interpreter_settings(config_data)
+
   def get_interpreter_settings(self):
     import params
     import json
@@ -313,6 +327,8 @@ class Master(Script):
 
   def update_zeppelin_interpreter(self):
     import params
+    if params.zeppelin_interpreter_config_upgrade == True:
+      self.reset_interpreter_settings()
     config_data = self.get_interpreter_settings()
     interpreter_settings = config_data['interpreterSettings']
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/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 6912c3d..f5a2a37 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
@@ -194,6 +194,10 @@ else:
 
 zeppelin_kerberos_keytab = config['configurations']['zeppelin-env']['zeppelin.server.kerberos.keytab']
 zeppelin_kerberos_principal = config['configurations']['zeppelin-env']['zeppelin.server.kerberos.principal']
+if 'zeppelin.interpreter.config.upgrade' in config['configurations']['zeppelin-config']:
+  zeppelin_interpreter_config_upgrade = config['configurations']['zeppelin-config']['zeppelin.interpreter.config.upgrade']
+else:
+  zeppelin_interpreter_config_upgrade = False
 
 # e.g. 2.3
 stack_version_unformatted = config['hostLevelParams']['stack_version']

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b052390/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
index 662b70c..2bfc0dc 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.3.0/configuration/zeppelin-config.xml
@@ -33,6 +33,13 @@
     <on-ambari-upgrade add="false"/>
   </property>
   <property>
+    <name>zeppelin.server.ssl.port</name>
+    <value>9995</value>
+    <description>Server ssl port. (used when ssl property is set to true)
+    </description>
+    <on-ambari-upgrade add="false"/>
+  </property>
+  <property>
     <name>zeppelin.notebook.dir</name>
     <value>notebook</value>
     <description>notebook persist</description>
@@ -192,4 +199,10 @@
     <description>Size in characters of the maximum text message to be received by websocket.
Defaults to 1024000</description>
     <on-ambari-upgrade add="false"/>
   </property>
+  <property>
+    <name>zeppelin.interpreter.config.upgrade</name>
+    <value>true</value>
+    <description>If this is set to true, on every restart of Zeppelin server default
interpreter parameters will be reset</description>
+    <on-ambari-upgrade add="false"/>
+  </property>
 </configuration>


Mime
View raw message