ruanwenjun commented on a change in pull request #5676:
URL: https://github.com/apache/dolphinscheduler/pull/5676#discussion_r657761323



##########
File path: 
dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginDiscovery.java
##########
@@ -83,6 +83,7 @@ private DolphinPluginDiscovery() {
 
         return listClasses(file.toPath()).stream()
                 .filter(name -> classInterfaces(name, 
classLoader).contains(DolphinSchedulerPlugin.class.getName()))
+                .map(plugin -> plugin.replace(File.separatorChar, '.'))

Review comment:
       Sorry, I am wrong.
   ```java
   return listClasses(file.toPath()).stream()
                   .filter(name -> classInterfaces(name, 
classLoader).contains(DolphinSchedulerPlugin.class.getName()))
                   .collect(Collectors.toSet());
   ```
   Your origin implementation is right, we need to use a map to transform.

##########
File path: 
dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginDiscovery.java
##########
@@ -83,6 +83,7 @@ private DolphinPluginDiscovery() {
 
         return listClasses(file.toPath()).stream()
                 .filter(name -> classInterfaces(name, 
classLoader).contains(DolphinSchedulerPlugin.class.getName()))
+                .map(plugin -> plugin.replace(File.separatorChar, '.'))

Review comment:
       Sorry, I am wrong, this is just a filter function.
   ```java
   return listClasses(file.toPath()).stream()
                   .filter(name -> classInterfaces(name, 
classLoader).contains(DolphinSchedulerPlugin.class.getName()))
                   .collect(Collectors.toSet());
   ```
   Your origin implementation is right, we need to use a map to transform.




-- 
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:
[email protected]


Reply via email to