You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2020/04/01 02:46:31 UTC

[zeppelin] branch master updated: [ZEPPELIN-4697] Zeppelin Quartz scheduler checks for updates against external endpoint

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 a7c75de  [ZEPPELIN-4697] Zeppelin Quartz scheduler checks for updates against external endpoint
a7c75de is described below

commit a7c75def4025373ce64ad95cd5feb994620ec9be
Author: Kevin Risden <kr...@apache.org>
AuthorDate: Fri Mar 27 14:52:07 2020 -0400

    [ZEPPELIN-4697] Zeppelin Quartz scheduler checks for updates against external endpoint
    
    ### What is this PR for?
    
    Zeppelin uses the Quartz scheduler which has a
    built in update checker. This reaches out to a
    Terracotta update server which leaks some
    information about the running server. This is
    recommended to be disabled in the docs.
    
    http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/best-practices.html#skip-update-check
    
    ### What type of PR is it?
    Bug Fix
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/ZEPPELIN-4697
    
    ### How should this be tested?
    * CI tests
    * Manually confirmed this removes the update check call to the Terracotta server
    
    ### Questions:
    * Does the licenses files need update? - No
    * Is there breaking changes for older versions? - No
    * Does this needs documentation? - No
    
    Author: Kevin Risden <kr...@apache.org>
    
    Closes #3700 from risdenk/ZEPPELIN-4697 and squashes the following commits:
    
    511d8687f [Kevin Risden] [ZEPPELIN-4697] Zeppelin Quartz scheduler checks for updates against external endpoint
---
 .../zeppelin/notebook/scheduler/QuartzSchedulerService.java      | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/scheduler/QuartzSchedulerService.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/scheduler/QuartzSchedulerService.java
index 416eddf..f0c19f4 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/scheduler/QuartzSchedulerService.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/scheduler/QuartzSchedulerService.java
@@ -55,7 +55,7 @@ public class QuartzSchedulerService implements SchedulerService {
       throws SchedulerException {
     this.zeppelinConfiguration = zeppelinConfiguration;
     this.notebook = notebook;
-    this.scheduler = new StdSchedulerFactory().getScheduler();
+    this.scheduler = getScheduler();
     this.scheduler.start();
 
     // Do in a separated thread because there may be many notes,
@@ -85,6 +85,13 @@ public class QuartzSchedulerService implements SchedulerService {
     loadingNotesThread.start();
   }
 
+  private Scheduler getScheduler() throws SchedulerException {
+    // Make sure to not check for Quartz update since this leaks information about running process
+    // http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/best-practices.html#skip-update-check
+    System.setProperty(StdSchedulerFactory.PROP_SCHED_SKIP_UPDATE_CHECK, "true");
+    return new StdSchedulerFactory().getScheduler();
+  }
+
   /**
    * This is only for testing, unit test should always call this method in setup() before testing.
    */