Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/en/connector-v2/sink/Redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Used to write data to Redis.

| name | type | required | default value |
|--------------------|---------|-----------------------|---------------|
| host | string | yes | - |
| port | int | yes | - |
| host | string | yes when mode=single | - |
| port | int | no | 6379 |
| key | string | yes | - |
| data_type | string | yes | - |
| batch_size | int | no | 10 |
Expand Down
6 changes: 3 additions & 3 deletions docs/en/connector-v2/source/Redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Used to read data from Redis.
## Options

| name | type | required | default value |
| ------------------- | ------ | --------------------- | ------------- |
| host | string | yes | - |
| port | int | yes | - |
| ------------------- | ------ |-----------------------| ------------- |
| host | string | yes when mode=single | - |
| port | int | no | 6379 |
| keys | string | yes | - |
| batch_size | int | yes | 10 |
| data_type | string | yes | - |
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/connector-v2/sink/Redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

| name | type | required | default value |
|--------------------|---------|-----------------------|---------------|
| host | string | yes | - |
| port | int | yes | - |
| host | string | `mode=single`时必须 | - |
| port | int | no | 6379 |
| key | string | yes | - |
| data_type | string | yes | - |
| batch_size | int | no | 10 |
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/connector-v2/source/Redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

| 名称 | 类型 | 是否必须 | 默认值 |
|---------------------|--------|--------------------|--------|
| host | string | | - |
| port | int | | - |
| host | string | `mode=single`时必须 | - |
| port | int | | 6379 |
| keys | string | 是 | - |
| batch_size | int | 是 | 10 |
| data_type | string | 是 | - |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum RedisMode {
.withDescription("redis hostname or ip");

public static final Option<Integer> PORT =
Options.key("port").intType().noDefaultValue().withDescription("redis port");
Options.key("port").intType().defaultValue(6379).withDescription("redis port");

public static final Option<String> AUTH =
Options.key("auth")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
@Slf4j
public class RedisParameters implements Serializable {
private String host;
private int port;
private Integer port;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some test case for RedisParameters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about update it to redis default port 6379.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about update it to redis default port 6379.

In cluster mode it should be null.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about update it to redis default port 6379.

In cluster mode it should be null.

In cluster moe, it won't be use
https://github.com/apache/seatunnel/pull/8841/files#diff-85c72df044b54265682571cdb07752eb396fdf68965cbcf863553efa9a22b34fR175

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's update it to 6379 as default. @fcb-xiaobo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thank you for your suggestions. I will update the code and documentation later

private String auth = "";
private int dbNum;
private String user = "";
Expand Down
Loading