You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "featzhang (via GitHub)" <gi...@apache.org> on 2023/03/30 12:33:11 UTC

[GitHub] [inlong] featzhang opened a new pull request, #7741: [INLONG-7730][Manager] Support node management for Redis

featzhang opened a new pull request, #7741:
URL: https://github.com/apache/inlong/pull/7741

   ### Prepare a Pull Request
   *[INLONG-7730][Manager] Support node management for Redis*
   
   - Fixes #7730 
   


-- 
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@inlong.apache.org

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


[GitHub] [inlong] vernedeng commented on a diff in pull request #7741: [INLONG-7730][Manager] Support node management for Redis

Posted by "vernedeng (via GitHub)" <gi...@apache.org>.
vernedeng commented on code in PR #7741:
URL: https://github.com/apache/inlong/pull/7741#discussion_r1155483639


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/redis/RedisDataNodeOperator.java:
##########
@@ -71,6 +77,34 @@ public DataNodeInfo getFromEntity(DataNodeEntity entity) {
     @Override
     protected void setTargetEntity(DataNodeRequest request, DataNodeEntity targetEntity) {
         RedisDataNodeRequest redisDataNodeRequest = (RedisDataNodeRequest) request;
+
+        RedisClusterMode clusterMode = RedisClusterMode.of(redisDataNodeRequest.getClusterMode());
+
+        switch (clusterMode) {
+            case STANDALONE:
+                String host = redisDataNodeRequest.getHost();
+                Preconditions.expectNotBlank(host, "Redis host cannot be empty");
+                Integer port = redisDataNodeRequest.getPort();
+                expectTrue(
+                        port != null && port > 1 && port < PORT_MAX_VALUE,

Review Comment:
   One of conditions is **_port > 1_**, but the error message is **_must be greater than 0_**



-- 
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@inlong.apache.org

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


[GitHub] [inlong] featzhang commented on a diff in pull request #7741: [INLONG-7730][Manager] Support node management for Redis

Posted by "featzhang (via GitHub)" <gi...@apache.org>.
featzhang commented on code in PR #7741:
URL: https://github.com/apache/inlong/pull/7741#discussion_r1155707762


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/redis/RedisDataNodeInfo.java:
##########
@@ -36,6 +37,42 @@
 @ApiModel("Redis data node info")
 public class RedisDataNodeInfo extends DataNodeInfo {
 
+    /**
+     * Redis cluster mode
+     */
+    @ApiModelProperty(value = "Redis cluster mode")
+    private String clusterMode;
+
+    /**
+     * Redis host
+     */
+    @ApiModelProperty(value = "Redis host")
+    private String host;
+
+    /**
+     * Redis port
+     */
+    @ApiModelProperty(value = "Redis port")
+    private Integer port;
+
+    /**
+     * Redis sentinel master name
+     */
+    @ApiModelProperty(value = "Redis sentinel master name")
+    private String sentinelMasterName;
+
+    /**
+     * Redis sentinel info
+     */
+    @ApiModelProperty(value = "Redis sentinel info")
+    private String sentinelsInfo;

Review Comment:
   Fixed:
   
   sentinelMasterName -> masterName
   



-- 
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@inlong.apache.org

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


[GitHub] [inlong] featzhang commented on a diff in pull request #7741: [INLONG-7730][Manager] Support node management for Redis

Posted by "featzhang (via GitHub)" <gi...@apache.org>.
featzhang commented on code in PR #7741:
URL: https://github.com/apache/inlong/pull/7741#discussion_r1155562495


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/redis/RedisDataNodeInfo.java:
##########
@@ -36,6 +37,42 @@
 @ApiModel("Redis data node info")
 public class RedisDataNodeInfo extends DataNodeInfo {
 
+    /**
+     * Redis cluster mode
+     */
+    @ApiModelProperty(value = "Redis cluster mode")
+    private String clusterMode;
+
+    /**
+     * Redis host
+     */
+    @ApiModelProperty(value = "Redis host")
+    private String host;
+
+    /**
+     * Redis port
+     */
+    @ApiModelProperty(value = "Redis port")
+    private Integer port;
+
+    /**
+     * Redis sentinel master name
+     */
+    @ApiModelProperty(value = "Redis sentinel master name")
+    private String sentinelMasterName;
+
+    /**
+     * Redis sentinel info
+     */
+    @ApiModelProperty(value = "Redis sentinel info")
+    private String sentinelsInfo;

Review Comment:
   The word `sentinelsInfo` refers to the method used in the apache bahir flink project:
   
   <https://github.com/apache/bahir-flink/blob/release-1.1/flink-connector-redis/src/main/java/org/apache/flink/streaming/connectors/redis/descriptor/RedisValidator.java#L31>



-- 
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@inlong.apache.org

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


[GitHub] [inlong] healchow commented on a diff in pull request #7741: [INLONG-7730][Manager] Support node management for Redis

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #7741:
URL: https://github.com/apache/inlong/pull/7741#discussion_r1155670984


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/redis/RedisDataNodeInfo.java:
##########
@@ -36,6 +37,42 @@
 @ApiModel("Redis data node info")
 public class RedisDataNodeInfo extends DataNodeInfo {
 
+    /**
+     * Redis cluster mode
+     */
+    @ApiModelProperty(value = "Redis cluster mode")
+    private String clusterMode;
+
+    /**
+     * Redis host
+     */
+    @ApiModelProperty(value = "Redis host")
+    private String host;
+
+    /**
+     * Redis port
+     */
+    @ApiModelProperty(value = "Redis port")
+    private Integer port;
+
+    /**
+     * Redis sentinel master name
+     */
+    @ApiModelProperty(value = "Redis sentinel master name")
+    private String sentinelMasterName;
+
+    /**
+     * Redis sentinel info
+     */
+    @ApiModelProperty(value = "Redis sentinel info")
+    private String sentinelsInfo;

Review Comment:
   If the configuration items are borrowed from other projects, it is recommended to be consistent with them to reduce the cost of understanding.



-- 
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@inlong.apache.org

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


[GitHub] [inlong] dockerzhang merged pull request #7741: [INLONG-7730][Manager] Support node management for Redis

Posted by "dockerzhang (via GitHub)" <gi...@apache.org>.
dockerzhang merged PR #7741:
URL: https://github.com/apache/inlong/pull/7741


-- 
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@inlong.apache.org

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


[GitHub] [inlong] featzhang commented on a diff in pull request #7741: [INLONG-7730][Manager] Support node management for Redis

Posted by "featzhang (via GitHub)" <gi...@apache.org>.
featzhang commented on code in PR #7741:
URL: https://github.com/apache/inlong/pull/7741#discussion_r1155562495


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/redis/RedisDataNodeInfo.java:
##########
@@ -36,6 +37,42 @@
 @ApiModel("Redis data node info")
 public class RedisDataNodeInfo extends DataNodeInfo {
 
+    /**
+     * Redis cluster mode
+     */
+    @ApiModelProperty(value = "Redis cluster mode")
+    private String clusterMode;
+
+    /**
+     * Redis host
+     */
+    @ApiModelProperty(value = "Redis host")
+    private String host;
+
+    /**
+     * Redis port
+     */
+    @ApiModelProperty(value = "Redis port")
+    private Integer port;
+
+    /**
+     * Redis sentinel master name
+     */
+    @ApiModelProperty(value = "Redis sentinel master name")
+    private String sentinelMasterName;
+
+    /**
+     * Redis sentinel info
+     */
+    @ApiModelProperty(value = "Redis sentinel info")
+    private String sentinelsInfo;

Review Comment:
   The word `sentinelsInfo` refers to the method used in the apache bahir flink project:
   
   `https://github.com/apache/bahir-flink/blob/release-1.1/flink-connector-redis/src/main/java/org/apache/flink/streaming/connectors/redis/descriptor/RedisValidator.java#L31`



-- 
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@inlong.apache.org

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


[GitHub] [inlong] healchow commented on a diff in pull request #7741: [INLONG-7730][Manager] Support node management for Redis

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #7741:
URL: https://github.com/apache/inlong/pull/7741#discussion_r1155461396


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/redis/RedisDataNodeInfo.java:
##########
@@ -36,6 +37,42 @@
 @ApiModel("Redis data node info")
 public class RedisDataNodeInfo extends DataNodeInfo {
 
+    /**
+     * Redis cluster mode
+     */
+    @ApiModelProperty(value = "Redis cluster mode")
+    private String clusterMode;
+
+    /**
+     * Redis host
+     */
+    @ApiModelProperty(value = "Redis host")
+    private String host;
+
+    /**
+     * Redis port
+     */
+    @ApiModelProperty(value = "Redis port")
+    private Integer port;
+
+    /**
+     * Redis sentinel master name
+     */
+    @ApiModelProperty(value = "Redis sentinel master name")
+    private String sentinelMasterName;
+
+    /**
+     * Redis sentinel info
+     */
+    @ApiModelProperty(value = "Redis sentinel info")
+    private String sentinelsInfo;

Review Comment:
   `sentinelsInfo`?  or `sentinelInfo`?



-- 
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@inlong.apache.org

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