Hi Prasad,

Good catch. While Notebook.CronJob.execute checks only last last paragraph,
it'll misbehave when parallel scheduler is used or paragraphs uses
different interpreters. I think this should be fixed.

In the beginning, Note was the term for set of Paragraphs and Notebook was
the term for set of Notes. But many zeppelin user used to use Notebook for
set of Paragraphs. I have no strong preference for specific terminology.
but +1 for consistent terminology.

Related issue - https://issues.apache.org/jira/browse/ZEPPELIN-616

Thanks,
moon

On Mon, Apr 25, 2016 at 3:44 PM Prasad Wagle <prasadwa...@gmail.com> wrote:

> *Cron Job*
>
> In Notebook.CronJob.execute, we check
> note.getLastParagraph().isTerminated()? How would this work if paragraphs
> in the note use different interpreters or if the interpreter uses parallel
> scheduler?
>
>   public static class CronJob implements org.quartz.Job {
>     public static Notebook notebook;
>
>     public void execute(JobExecutionContext context) throws
> JobExecutionException {
>
>       String noteId =
> context.getJobDetail().getJobDataMap().getString("noteId");
>       Note note = notebook.getNote(noteId);
>       note.runAll();
>
>       *while (!note.getLastParagraph().isTerminated()) {*
>         try {
>           Thread.sleep(1000);
>         } catch (InterruptedException e) {
>           logger.error(e.toString(), e);
>         }
>       }
>
> *Notebook/note terminology*
>
> In the Zeppelin UI, Notebook is a collection of notes.
> Notebook
>  Import note <https://zeppelin.twitter.biz/> Create new note
> <https://zeppelin.twitter.biz/>
>
> In
> http://zeppelin.incubator.apache.org/docs/0.5.5-incubating/manual/notebookashomepage.html
> :
> Zeppelin allows you to use one of the notebooks you create as your
> zeppelin Homepage.
>
> It seems to me that the use of notebook/note is inconsistent. How should
> we resolve this? Ipython/jupyter uses Notebook to mean a note in the
> Zeppelin UI. Should we be consistent with that terminology? IMO, deciding
> the terminology we expose to the user is more important. We can change the
> code to reflect that over time.
>
>
> Thanks,
> Prasad
>

Reply via email to