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/01/23 02:47:49 UTC

[GitHub] [incubator-seatunnel] yx91490 opened a new pull request #1141: [SEATUNNEL#1140][plugin] recover unequal code transform in FakeStream

yx91490 opened a new pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141


   <!--
   
   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 "[SeaTunnel #XXXX] [component] Title of the pull request", where *SeaTunnel #XXXX* should be replaced by the actual issue number.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   close #1140 
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for reason:
   * [x] 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/developement/NewLicenseGuide.md)
   * [x] 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] yx91490 commented on a change in pull request #1141: [Bug] [transform] Recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
yx91490 commented on a change in pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#discussion_r804616963



##########
File path: seatunnel-connectors/seatunnel-connector-spark-fake/src/main/scala/org/apache/seatunnel/spark/source/FakeStream.scala
##########
@@ -56,7 +56,11 @@ class FakeStream extends SparkStreamingSource[String] {
   }
 
   override def checkConfig(): CheckResult = {
-    checkAllExists(config, "content")
+    if (config.hasPath("content") && config.getStringList("content").nonEmpty) {
+      CheckResult.success()

Review comment:
       @simon824  what do you think ?




-- 
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] simon824 commented on a change in pull request #1141: [Bug] [transform] Recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
simon824 commented on a change in pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#discussion_r805104727



##########
File path: seatunnel-connectors/seatunnel-connector-spark-fake/src/main/scala/org/apache/seatunnel/spark/source/FakeStream.scala
##########
@@ -56,7 +56,11 @@ class FakeStream extends SparkStreamingSource[String] {
   }
 
   override def checkConfig(): CheckResult = {
-    checkAllExists(config, "content")
+    if (config.hasPath("content") && config.getStringList("content").nonEmpty) {
+      CheckResult.success()

Review comment:
       Actually, this problem exist in many other connectors, it's unnecessary to fix all connectors `checkConfig` one by one.  
   #1214 this pr has fix similar problem.




-- 
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] yx91490 commented on a change in pull request #1141: [SEATUNNEL#1140][plugin] recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
yx91490 commented on a change in pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#discussion_r790778436



##########
File path: seatunnel-connectors/seatunnel-connector-spark-fake/src/main/scala/org/apache/seatunnel/spark/source/FakeStream.scala
##########
@@ -56,7 +56,11 @@ class FakeStream extends SparkStreamingSource[String] {
   }
 
   override def checkConfig(): CheckResult = {
-    checkAllExists(config, "content")
+    if (config.hasPath("content") && config.getStringList("content").nonEmpty) {
+      CheckResult.success()

Review comment:
       Firstly let's make it correctly by recover it, then finish your idea in another issue may be better.




-- 
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] leo65535 commented on pull request #1141: [SEATUNNEL#1140][plugin] recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
leo65535 commented on pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#issuecomment-1019901871


   hi @simon824, can you help to review when you are free.


-- 
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] yx91490 commented on a change in pull request #1141: [Bug] [transform] Recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
yx91490 commented on a change in pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#discussion_r805129801



##########
File path: seatunnel-connectors/seatunnel-connector-spark-fake/src/main/scala/org/apache/seatunnel/spark/source/FakeStream.scala
##########
@@ -56,7 +56,11 @@ class FakeStream extends SparkStreamingSource[String] {
   }
 
   override def checkConfig(): CheckResult = {
-    checkAllExists(config, "content")
+    if (config.hasPath("content") && config.getStringList("content").nonEmpty) {
+      CheckResult.success()

Review comment:
       this pr seems not bad, it's suitable for this issue, but put all checks to CheckConfigUtil.checkAllExists() may cause lacking of type check, for example, if you want to get a intList, but provide stringList.
   If you get a good idea about how to check all param's existance along with it's type, please tell me, thanks.




-- 
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] simon824 commented on a change in pull request #1141: [SEATUNNEL#1140][plugin] recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
simon824 commented on a change in pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#discussion_r790623321



##########
File path: seatunnel-connectors/seatunnel-connector-spark-fake/src/main/scala/org/apache/seatunnel/spark/source/FakeStream.scala
##########
@@ -56,7 +56,11 @@ class FakeStream extends SparkStreamingSource[String] {
   }
 
   override def checkConfig(): CheckResult = {
-    checkAllExists(config, "content")
+    if (config.hasPath("content") && config.getStringList("content").nonEmpty) {
+      CheckResult.success()

Review comment:
       Maybe we can check if the type of `config.getAnyRef("content")`  is` List`  in `CheckConfigUtil.checkAllExists()`, which can be in common use.




-- 
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] yx91490 commented on pull request #1141: [Bug] [transform] Recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
yx91490 commented on pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#issuecomment-1037085119


   this pr was broken, continue to https://github.com/apache/incubator-seatunnel/pull/1237


-- 
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] leo65535 commented on pull request #1141: [SEATUNNEL#1140][plugin] recover unequal code transform in FakeStream

Posted by GitBox <gi...@apache.org>.
leo65535 commented on pull request #1141:
URL: https://github.com/apache/incubator-seatunnel/pull/1141#issuecomment-1019646779


   Hi, did you meet some exception? It seems not clear why we need recover this change.


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