This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new c2f9c72 ZEPPELIN-4466. Cron is not enabled after configuration is changed c2f9c72 is described below commit c2f9c722948a96a50f520cb6e15549c6554a174b Author: Jeff Zhang <zjf...@apache.org> AuthorDate: Wed Dec 4 15:13:56 2019 +0800 ZEPPELIN-4466. Cron is not enabled after configuration is changed ### What is this PR for? The root cause is that we should set cron property when reading from note file. ### What type of PR is it? [Bug Fix ] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-4466 ### How should this be tested? * CI pass ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <zjf...@apache.org> Closes #3533 from zjffdu/ZEPPELIN-4466 and squashes the following commits: 1ac149ffe [Jeff Zhang] ZEPPELIN-4466. Cron is not enabled after configuration is changed --- .../org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java | 1 + zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java b/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java index 3301daa..e4533f0 100644 --- a/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java +++ b/zeppelin-plugins/notebookrepo/filesystem/src/test/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepoTest.java @@ -74,6 +74,7 @@ public class FileSystemNotebookRepoTest { Map<String, Object> config = new HashMap<>(); config.put("config_1", "value_1"); + config.put("isZeppelinNotebookCronEnable", false); note.setConfig(config); hdfsNotebookRepo.save(note, authInfo); assertEquals(1, hdfsNotebookRepo.list(authInfo).size()); diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java index 3e93038..c1d07e0 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java @@ -106,6 +106,7 @@ public class Note implements JsonSerializable { public Note() { generateId(); + setCronSupported(ZeppelinConfiguration.create()); } public Note(String path, String defaultInterpreterGroup, InterpreterFactory factory, @@ -1032,6 +1033,7 @@ public class Note implements JsonSerializable { try { Note note = gson.fromJson(json, Note.class); + note.setCronSupported(ZeppelinConfiguration.create()); convertOldInput(note); note.info.remove("isRunning"); note.postProcessParagraphs();