[GitHub] [zeppelin] zjffdu commented on a diff in pull request #4355: [DRAFT] [ZEPPELIN-5722] Improve PluginManager

2022-04-21 Thread GitBox


zjffdu commented on code in PR #4355:
URL: https://github.com/apache/zeppelin/pull/4355#discussion_r855715888


##
zeppelin-zengine/pom.xml:
##
@@ -40,6 +40,7 @@
 1.3
 2.6.0
 4.5.4.201711221230-r
+3.6.0

Review Comment:
   It is also defined in root pom.xml



-- 
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



[GitHub] [zeppelin] zjffdu commented on a diff in pull request #4355: [DRAFT] [ZEPPELIN-5722] Improve PluginManager

2022-04-21 Thread GitBox


zjffdu commented on code in PR #4355:
URL: https://github.com/apache/zeppelin/pull/4355#discussion_r855715546


##
zeppelin-plugins/notebookrepo/mongo/src/main/java/org/apache/zeppelin/notebook/repo/MongoPlugin.java:
##
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zeppelin.notebook.repo;
+
+import org.pf4j.Plugin;
+import org.pf4j.PluginWrapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MongoPlugin extends Plugin {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(MongoPlugin.class);
+
+  public MongoPlugin(PluginWrapper wrapper) {
+super(wrapper);
+  }
+
+  @Override
+  public void start() {
+LOGGER.info("MongoPlugin started");

Review Comment:
   It looks like all the Plugin start and stop method are the same, then how 
about defining a Base Plugin class that implement the start and stop method. 
And we can just add one field `name` to this base plugin class and each plugin 
implementation can set value to `name` in the constructor.



-- 
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



[GitHub] [zeppelin] zjffdu commented on a diff in pull request #4355: [DRAFT] [ZEPPELIN-5722] Improve PluginManager

2022-04-21 Thread GitBox


zjffdu commented on code in PR #4355:
URL: https://github.com/apache/zeppelin/pull/4355#discussion_r855714012


##
zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterLauncher.java:
##
@@ -54,11 +57,11 @@ public InterpreterClient 
launchDirectly(InterpreterLaunchContext context) throws
 
 StandardInterpreterLauncher interpreterLauncher = null;
 if (isSpark()) {
-  interpreterLauncher = new SparkInterpreterLauncher(zConf, 
recoveryStorage);
+  interpreterLauncher = (StandardInterpreterLauncher) 
pluginManager.createInterpreterLauncher("SparkInterpreterLauncher", 
recoveryStorage);
 } else if (isFlink()) {
-  interpreterLauncher = new FlinkInterpreterLauncher(zConf, 
recoveryStorage);
+  interpreterLauncher = (StandardInterpreterLauncher) 
pluginManager.createInterpreterLauncher("FlinkInterpreterLauncher", 
recoveryStorage);

Review Comment:
   FlinkInterpreterLauncher ?



-- 
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



[GitHub] [zeppelin] zjffdu commented on a diff in pull request #4355: [DRAFT] [ZEPPELIN-5722] Improve PluginManager

2022-04-21 Thread GitBox


zjffdu commented on code in PR #4355:
URL: https://github.com/apache/zeppelin/pull/4355#discussion_r855713929


##
zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterLauncher.java:
##
@@ -54,11 +57,11 @@ public InterpreterClient 
launchDirectly(InterpreterLaunchContext context) throws
 
 StandardInterpreterLauncher interpreterLauncher = null;
 if (isSpark()) {
-  interpreterLauncher = new SparkInterpreterLauncher(zConf, 
recoveryStorage);
+  interpreterLauncher = (StandardInterpreterLauncher) 
pluginManager.createInterpreterLauncher("SparkInterpreterLauncher", 
recoveryStorage);

Review Comment:
   SparkInterpreterLauncher ?



-- 
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