From ab66003c2820b338a7315dcd45653d8f7dfe1f4d Mon Sep 17 00:00:00 2001 From: Prasad Wagle Date: Mon, 25 Apr 2016 16:50:14 -0700 Subject: [PATCH] Run scheduled notes with a user --- zeppelin-web/src/app/notebook/notebook-actionBar.html | 7 +++++++ zeppelin-web/src/app/notebook/notebook.controller.js | 6 ++++++ .../src/main/java/org/apache/zeppelin/notebook/Note.java | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/zeppelin-web/src/app/notebook/notebook-actionBar.html b/zeppelin-web/src/app/notebook/notebook-actionBar.html index f371bd318a8..21f7e9754d8 100644 --- a/zeppelin-web/src/app/notebook/notebook-actionBar.html +++ b/zeppelin-web/src/app/notebook/notebook-actionBar.html @@ -131,6 +131,13 @@

{{note.info.cron}}

+
+ - Cron executing user (click enter in field to submit) + +
- auto-restart interpreter on cron execution > generateParagraphsInfo (){ * Run all paragraphs sequentially. */ public void runAll() { + String cronExecutingUser = (String) getConfig().get("cronExecutingUser"); synchronized (paragraphs) { for (Paragraph p : paragraphs) { if (!p.isEnabled()) { continue; } + AuthenticationInfo authenticationInfo = new AuthenticationInfo(); + authenticationInfo.setUser(cronExecutingUser); + p.setAuthenticationInfo(authenticationInfo); p.setNoteReplLoader(replLoader); p.setListener(jobListenerFactory.getParagraphJobListener(this)); Interpreter intp = replLoader.get(p.getRequiredReplName());