You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/04 09:58:01 UTC

[GitHub] [incubator-seatunnel] laglangyue opened a new pull request, #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

laglangyue opened a new pull request, #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*
   issue :
   https://github.com/apache/incubator-seatunnel/issues/2551
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] laglangyue commented on pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
laglangyue commented on PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639#issuecomment-1238179612

   @TyrantLucifer Please review it 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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] laglangyue commented on pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
laglangyue commented on PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639#issuecomment-1236302023

   close https://github.com/apache/incubator-seatunnel/issues/2551


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on code in PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639#discussion_r964336209


##########
seatunnel-core/seatunnel-flink-starter/src/main/java/org/apache/seatunnel/core/starter/flink/execution/FlinkExecution.java:
##########
@@ -54,6 +59,17 @@ public FlinkExecution(Config config) {
         this.sourcePluginExecuteProcessor = new SourceExecuteProcessor(flinkEnvironment, config.getConfigList("source"));
         this.transformPluginExecuteProcessor = new TransformExecuteProcessor(flinkEnvironment, config.getConfigList("transform"));
         this.sinkPluginExecuteProcessor = new SinkExecuteProcessor(flinkEnvironment, config.getConfigList("sink"));
+        List<URL> pluginsJarDependencies = Common.getPluginsJarDependencies().stream()

Review Comment:
   these code can be extract one method called: `registerPluginsJar`



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639#issuecomment-1240751326

   LGTM


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] CalvinKirs merged pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
CalvinKirs merged PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on code in PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639#discussion_r962335644


##########
seatunnel-core/seatunnel-spark-starter/src/main/java/org/apache/seatunnel/core/starter/spark/SparkStarter.java:
##########
@@ -191,7 +191,7 @@ private List<Path> getPluginsJarDependencies() throws IOException {
             return stream

Review Comment:
   The same suggestion as above. Move this method to `org.apache.seatunnel.common.config`



##########
seatunnel-core/seatunnel-flink-starter/src/main/java/org/apache/seatunnel/core/starter/flink/execution/FlinkExecution.java:
##########
@@ -70,4 +84,32 @@ public void execute() throws TaskExecuteException {
             throw new TaskExecuteException("Execute Flink job error", e);
         }
     }
+
+    /**
+     * return plugin's dependent jars, which located in 'plugins/${pluginName}/lib/*'.
+     */
+    private List<URL> getPluginsJarDependencies() {

Review Comment:
   This method is implemented once in both sparkstarter and flinkstarter, and there is almost no difference in the code, so you can put this method as a static method in this class `org.apache.seatunnel.common.config`, 
   The method is defined as follows:
   
   ```java
   
   List<Path> getPluginsJarDependencies() throws IOException {}
   
   ```
   
   In flinkstarter, you can use it like this:
   
   ```java
   
   List<URL> pluginDependencies = Common.getPluginsJarDependencies().stream().map(jar -> jar.toUri().toURL())
   
   ```
   
   This can greatly reduce the redundancy of the code, what do you think about it?



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] laglangyue commented on pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
laglangyue commented on PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639#issuecomment-1236303246

   ![image](https://user-images.githubusercontent.com/35491928/188308144-5ee29ea9-e31f-4770-bf5d-553a728aefd5.png)
   it will error for file which use  `Paths.endswith("jar")`
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] TyrantLucifer commented on a diff in pull request #2639: [Bug] fix flink-start didn't load plugins/${pluginName}/lib/*

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on code in PR #2639:
URL: https://github.com/apache/incubator-seatunnel/pull/2639#discussion_r963902916


##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/config/Common.java:
##########
@@ -33,6 +41,9 @@ private Common() {
      */
     public static final int COLLECTION_SIZE = 16;
 

Review Comment:
   Remove redundant blank line.



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org