You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2019/08/05 02:30:43 UTC

[GitHub] [zeppelin] zjffdu commented on a change in pull request #3421: ZEPPELIN-4227. Move StandardInterpreterLauncher and SparkInterpreterLauncher into zeppelin-zengine

zjffdu commented on a change in pull request #3421: ZEPPELIN-4227. Move StandardInterpreterLauncher and SparkInterpreterLauncher into zeppelin-zengine
URL: https://github.com/apache/zeppelin/pull/3421#discussion_r310422175
 
 

 ##########
 File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/plugin/PluginManager.java
 ##########
 @@ -140,6 +140,19 @@ public synchronized InterpreterLauncher loadInterpreterLauncher(String launcherP
       return cachedLaunchers.get(launcherPlugin);
     }
     LOGGER.info("Loading Interpreter Launcher Plugin: " + launcherPlugin);
+    // load plugin from classpath directly first for these builtin InterpreterLauncher.
+    // If fails, then try to load it from plugin folder.
+    try {
+      InterpreterLauncher launcher = (InterpreterLauncher)
+              (Class.forName("org.apache.zeppelin.interpreter.launcher." + launcherPlugin))
+                      .getConstructor(ZeppelinConfiguration.class, RecoveryStorage.class)
+                      .newInstance(zConf, recoveryStorage);
+      return launcher;
+    } catch (InstantiationException | IllegalAccessException | ClassNotFoundException
+            | NoSuchMethodException | InvocationTargetException e) {
+      LOGGER.warn("Fail to instantiate InterpreterLauncher from classpath directly:" + launcherPlugin);
 
 Review comment:
   Addressed

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services