Reamer commented on code in PR #4382: URL: https://github.com/apache/zeppelin/pull/4382#discussion_r912790957
########## zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java: ########## @@ -109,6 +119,60 @@ public void recoveryIfNecessary() { } } + /** + * Subsystems can add a consumer, which is executed during initialization. + * Initialization is performed in parallel and with multiple threads. + * + * The consumer must be thread safe. + * + * @param initConsumer Consumer, which is passed the NoteId. + */ + public void addInitConsumer(Consumer<String> initConsumer) { + this.initConsumers.add(initConsumer); + } + + /** + * Asynchronous and parallel initialization of notes (during startup) + */ + public void initNotebook() { + initExecutor = new ThreadPoolExecutor(0, Runtime.getRuntime().availableProcessors(), 1, TimeUnit.MINUTES, Review Comment: @jongyoul Please check again. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org