zjffdu commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph 
config default value can be customized
URL: https://github.com/apache/zeppelin/pull/3271#discussion_r243930233
 
 

 ##########
 File path: 
zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
 ##########
 @@ -450,6 +459,21 @@ protected InterpreterResult jobRun() throws Throwable {
         p.settings.setParams(settings.getParams());
       }
 
+      // After the paragraph is executed,
+      // need to apply the paragraph to the configuration in the
+      // `interpreter-setting.json` config
+      InterpreterSettingManager intpSettingManager
+          = this.note.getInterpreterSettingManager();
+      if (null != intpSettingManager) {
+        InterpreterGroup intpGroup = interpreter.getInterpreterGroup();
+        if (intpGroup instanceof ManagedInterpreterGroup) {
+          String name = ((ManagedInterpreterGroup) 
intpGroup).getInterpreterSetting().getName();
+          Map<String, Object> config
+              = intpSettingManager.getConfigSetting(name);
+          applyConfigSetting(config);
+        }
+      }
+
 
 Review comment:
   What if user change the config ? e.g. User change the `displayTitle` to 
false in frontend for submarine interpreter, then after user execute the 
paragraph, the config will be reset ? Will `displayTitle` become true again ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to