liuxunorg 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_r243934613
##########
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:
There should be no problem. It has been shown in the GIF. You can modify the
magic at any time.
Assuming `submarine` sets the display title, `python` does not set the
display title.
In the note created with submarine, all newly created paragraphs will
display the title by default using the submarine configuration.
If you use `%python` to modify the default interpreter in a paragraph,
Paragraph::applyConfigSetting() will re-use python's configuration to take
effect in this paragraph.
The default interpreter behavior for each note, which was previously
discussed in the email, may be a more complicated issue.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services