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_r243930098
 
 

 ##########
 File path: 
zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
 ##########
 @@ -365,6 +369,13 @@ public void fireParagraphUpdateEvent(Paragraph p) throws 
IOException {
    */
   public Paragraph insertNewParagraph(int index, AuthenticationInfo 
authenticationInfo) {
     Paragraph paragraph = new Paragraph(this, paragraphJobListener);
+    if (null != interpreterSettingManager) {
+      // Set the default parameter configuration for the paragraph
+      // based on `interpreter-setting.json` config
+      Map<String, Object> config =
+          interpreterSettingManager.getConfigSetting(defaultInterpreterGroup);
+      paragraph.setConfig(config);
+    }
 
 Review comment:
   Currently, the interpreter of new paragraph is not the default interpreter 
of note. It is the interpreter of the paragraph before the current paragraph. 
(we can discuss whether this is correct behavior). So in that case, I don't 
think you can set the default config of the default note interpreter. 

----------------------------------------------------------------
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