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 06:07:58 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 58c6848a7 -> 4b04a325e


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/4b04a325
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b04a325
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b04a325

Branch: refs/heads/trunk
Commit: 4b04a325eea0f7fa0193a375a10bb168546aa63d
Parents: 58c6848
Author: Gaurav Nagar <grvngr@gmail.com>
Authored: Wed Aug 30 11:37:48 2017 +0530
Committer: Gaurav Nagar <grvngr@gmail.com>
Committed: Wed Aug 30 11:37:48 2017 +0530

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/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/4b04a325/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..2142bb4 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
@@ -216,7 +216,9 @@ class Master(Script):
       self.create_interpreter_json()
       self.update_zeppelin_interpreter()
 
-    self.update_kerberos_properties()
+    if params.zeppelin_interpreter_config_upgrade == True:
+      self.reset_interpreter_settings()
+      self.update_zeppelin_interpreter()
 
     Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> '
             + params.zeppelin_log_file, user=params.zeppelin_user)
@@ -235,6 +237,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
@@ -433,6 +449,7 @@ class Master(Script):
           del interpreter_settings[setting_key]
 
     self.set_interpreter_settings(config_data)
+    self.update_kerberos_properties()
 
   def create_interpreter_json(self):
     import interpreter_json_template

http://git-wip-us.apache.org/repos/asf/ambari/blob/4b04a325/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/4b04a325/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