[ZEPPELIN-4619] Run a note from the commandline#3654
[ZEPPELIN-4619] Run a note from the commandline#3654Leemoonsoo wants to merge 5 commits intoapache:masterfrom
Conversation
| } | ||
|
|
||
| private static void runNoteOnStart(ZeppelinConfiguration conf) throws IOException, InterruptedException { | ||
| String noteIdToRun = conf.getNotebookRunId(); |
There was a problem hiding this comment.
It's better to add logging here to show zeppelin server is running note after started.
| } | ||
| } | ||
|
|
||
| public boolean runNote(String noteId, |
There was a problem hiding this comment.
You can use runAllParagraphs https://github.com/apache/zeppelin/blob/master/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java#L347
Or maybe rename it to runNote
There was a problem hiding this comment.
I modified existing runAllParagraphs to return boolean value depends (that will be translated to exit value of the commandline). And added overloaded method to make it run without providing paragraph data. What do you think?
d98c4d7 to
07d3e61
Compare
| ); | ||
| } | ||
|
|
||
| public boolean runAllParagraphs(String noteId, |
There was a problem hiding this comment.
How about using the existing runAllParagraphs, and check whether paragraphs is empty, then use the paragraph in backend, otherwise use the paragraphs from frontend.
There was a problem hiding this comment.
Addressed the comment. Please take a look updated code.
fc1c1f6 to
a7531a4
Compare
|
Thanks @Leemoonsoo LGTM |
|
I removed a useless test. Thanks, @zjffdu for the review. I'll merge to master. |
What is this PR for?
This PR adds a command-line option to run a single note.
The code is pickled from #3356.
Usage is
The command will launch a Zeppelin server and run a given note, and terminate on after all paragraph's successful run (with exit 0) or terminate on any paragraph error (with exit 1).
What type of PR is it?
Feature
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-4619
Questions: