Details
Description
zeppelinContext is able to invoke run and runNote method, this feature make the current note easy to run other notes or paragraphs.
If the paragraph is inserted or ran by any user before invoking runNote, the runNote method can successfully run it. However, if the paragraph is loaded from repository by zeppelin and nobody run this paragraph since zeppelin started, Nullpointer exception will be thrown.
The exception was thrown when the program ran to the following code which is located at method jobRun of Pragraph class.
LOGGER.info("Run paragraph [paragraph_id: {}, interpreter: {}, note_id: {}, user: {}]", getId(), this.interpreter.getClassName(), note.getId(), subject.getUser());
The null object subject leads to this error. After viewing the source code(insertParagraph and runParagraph in NotebookServer), I understood that paragraph will setAuthenticationInfo(setSubject and setUser) when someone insert or run it, and that's why runNote can be invoked successfully.
I guess that zeppelinContext runNote will submit paragraphs into interpreter scheduler directly without setAuthenticationInfo. So if the paragraphs haven't been ran by anyone, Nullpointer exception will be thrown.
This makes an other problem that paragraph will use the user who inserts or last runs it to getBindInterpreter, not the user who invokes runNote. So in per use isolated mode, it will launch multiple sets of resources when invoke runNote, if paragraph has been ran by another user.
Please correct me if there are any mistakes mentioned above.
The method run of zeppelinContext will throw Nullpointer. I have no idea about this problem, so I'm sorry I can't give you more information about this.