use of org.apache.zeppelin.notebook.socket.Message in project zeppelin by apache.
the class NotebookServer method onOutputUpdated.
/**
* This callback is for the paragraph that runs on ZeppelinServer
*
* @param output output to update (replace)
*/
@Override
public void onOutputUpdated(String noteId, String paragraphId, int index, InterpreterResult.Type type, String output) {
Message msg = new Message(OP.PARAGRAPH_UPDATE_OUTPUT).put("noteId", noteId).put("paragraphId", paragraphId).put("index", index).put("type", type).put("data", output);
Note note = notebook().getNote(noteId);
if (note.isPersonalizedMode()) {
String user = note.getParagraph(paragraphId).getUser();
if (null != user) {
multicastToUser(user, msg);
}
} else {
broadcast(noteId, msg);
}
}
Aggregations