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/04/06 10:02:37 UTC

[GitHub] [incubator-seatunnel] ruanwenjun opened a new pull request, #1664: [Bug] [core] Cannot load plugin due to plugin name is not class name

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

   ## Purpose of this pull request
   
   This pr add a new method in Plugin.
   ```java
      /**
        * Return the plugin name, this is used in seatunnel conf DSL.
        *
        * @return plugin name.
        */
       default String getPluginName() {
           return this.getClass().getSimpleName();
       }
   ```
   And will use this method to charge whether the plugin should be used. And override this method in subclass to adapte the current plugin name.
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in you PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/development/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] ruanwenjun commented on pull request #1664: [Bug] [core] Cannot load plugin due to plugin name is not class name

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

   This is strange, I can compile success in my laptop.


-- 
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 #1664: [Bug] [core] Cannot load plugin due to plugin name is not class name

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


-- 
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] ruanwenjun commented on a diff in pull request #1664: [Bug] [core] Cannot load plugin due to plugin name is not class name

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


##########
seatunnel-connectors/seatunnel-connectors-spark/seatunnel-connector-spark-jdbc/src/main/scala/org/apache/seatunnel/spark/jdbc/sink/Jdbc.scala:
##########
@@ -69,4 +69,6 @@ class Jdbc extends SparkBatchSink {
         "duplicateIncs" -> ""))
     config = config.withFallback(defaultConfig)
   }
+
+  override def getPluginName: String = "jdbc"

Review Comment:
   Agree with you, done.



-- 
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] BenJFan commented on a diff in pull request #1664: [Bug] [core] Cannot load plugin due to plugin name is not class name

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


##########
seatunnel-connectors/seatunnel-connectors-spark/seatunnel-connector-spark-jdbc/src/main/scala/org/apache/seatunnel/spark/jdbc/sink/Jdbc.scala:
##########
@@ -69,4 +69,6 @@ class Jdbc extends SparkBatchSink {
         "duplicateIncs" -> ""))
     config = config.withFallback(defaultConfig)
   }
+
+  override def getPluginName: String = "jdbc"

Review Comment:
   Maybe all plugin name use upper camel case would be better on code specification?



-- 
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] ruanwenjun commented on pull request #1664: [Bug] [core] Cannot load plugin due to plugin name is not class name

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

   > Maybe we need to update plugin docs?
   
   No need to update the docs, since the  plugin name is still the old.


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