This is an automated email from the ASF dual-hosted git repository.

vbrodetskyi pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new c386567  [AMBARI-23043] Table or view not found error' with livy/livy2 
interpreter on upgraded cluster to Fenton-M30
c386567 is described below

commit c3865676200a55fdbbcaf8377068d87162141532
Author: vbrodetskyi <[email protected]>
AuthorDate: Wed Feb 21 18:59:52 2018 +0200

    [AMBARI-23043] Table or view not found error' with livy/livy2 interpreter 
on upgraded cluster to Fenton-M30
---
 .../ZEPPELIN/0.7.0/package/scripts/master.py       | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
index 56ed31c..6607c4c 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
@@ -292,6 +292,39 @@ class Master(Script):
       if setting_key not in interpreter_settings:
         interpreter_settings[setting_key] = interpreter_json_template[
           setting_key]
+      else:
+        templateGroups = 
interpreter_json_template[setting_key]['interpreterGroup']
+        groups = interpreter_settings[setting_key]['interpreterGroup']
+
+        templateProperties = 
interpreter_json_template[setting_key]['properties']
+        properties = interpreter_settings[setting_key]['properties']
+
+        templateOptions = interpreter_json_template[setting_key]['option']
+        options = interpreter_settings[setting_key]['option']
+
+        # search for difference in groups from current interpreter and 
template interpreter
+        # if any group exists in template but doesn't exist in current 
interpreter, it will be added
+        group_names = []
+        for group in groups:
+          group_names.append(group['name'])
+
+        for template_group in templateGroups:
+          if not template_group['name'] in group_names:
+            groups.append(template_group)
+
+
+        # search for difference in properties from current interpreter and 
template interpreter
+        # if any property exists in template but doesn't exist in current 
interpreter, it will be added
+        for template_property in templateProperties:
+          if not template_property in properties:
+            properties[template_property] = 
templateProperties[template_property]
+
+
+        # search for difference in options from current interpreter and 
template interpreter
+        # if any option exists in template but doesn't exist in current 
interpreter, it will be added
+        for template_option in templateOptions:
+          if not template_option in options:
+            options[template_option] = templateOptions[template_option]
 
     self.set_interpreter_settings(config_data)
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to