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/03/20 08:37:46 UTC

[GitHub] [incubator-seatunnel] DingPengfei opened a new pull request #1524: [Bug] [connector-spark-redis] Fix config param issues of spark redis sink

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


   <!--
   
   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
   Fix config param issues of spark redis sink
   this close #1522 
   <!-- 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] BenJFan commented on a change in pull request #1524: [Bug] [connector-spark-redis] Fix config param issues of spark redis sink

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



##########
File path: seatunnel-connectors/seatunnel-connectors-spark/seatunnel-connector-spark-redis/src/main/scala/org/apache/seatunnel/spark/sink/Redis.scala
##########
@@ -38,7 +38,7 @@ class Redis extends SparkBatchSink with Logging {
     val redisConfigs = new RedisConfig(RedisEndpoint(
       host = config.getString(HOST),
       port = config.getInt(PORT),
-      auth = config.getString(AUTH),
+      auth = if (config.getIsNull(AUTH)) null else config.getString(AUTH),

Review comment:
       OK, I didn't notice.




-- 
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 #1524: [Bug] [connector-spark-redis] Fix config param issues of spark redis sink

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


   


-- 
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] DingPengfei commented on a change in pull request #1524: [Bug] [connector-spark-redis] Fix config param issues of spark redis sink

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



##########
File path: seatunnel-connectors/seatunnel-connectors-spark/seatunnel-connector-spark-redis/src/main/scala/org/apache/seatunnel/spark/sink/Redis.scala
##########
@@ -38,7 +38,7 @@ class Redis extends SparkBatchSink with Logging {
     val redisConfigs = new RedisConfig(RedisEndpoint(
       host = config.getString(HOST),
       port = config.getInt(PORT),
-      auth = config.getString(AUTH),
+      auth = if (config.getIsNull(AUTH)) null else config.getString(AUTH),

Review comment:
       `DEFAULT_AUTH` is null, `config.getString(DEFAULT_AUTH)` can get an error




-- 
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 change in pull request #1524: [Bug] [connector-spark-redis] Fix config param issues of spark redis sink

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



##########
File path: seatunnel-connectors/seatunnel-connectors-spark/seatunnel-connector-spark-redis/src/main/scala/org/apache/seatunnel/spark/sink/Redis.scala
##########
@@ -38,7 +38,7 @@ class Redis extends SparkBatchSink with Logging {
     val redisConfigs = new RedisConfig(RedisEndpoint(
       host = config.getString(HOST),
       port = config.getInt(PORT),
-      auth = config.getString(AUTH),
+      auth = if (config.getIsNull(AUTH)) null else config.getString(AUTH),

Review comment:
       Already put it into DefaultConfig in line 75, So `AUTH` alway be not null, same as `DATA_TYPE`




-- 
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 pull request #1524: [Bug] [connector-spark-redis] Fix config param issues of spark redis sink

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


   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