EricJoy2048 commented on code in PR #3402:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3402#discussion_r1020665882


##########
seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/config/SinkConfig.java:
##########
@@ -34,22 +36,75 @@
 @ToString
 public class SinkConfig {
 
-    public static final String NODE_URLS = "nodeUrls";
-    public static final String USERNAME = "username";
-    public static final String PASSWORD = "password";
-    public static final String LABEL_PREFIX = "labelPrefix";
-    public static final String DATABASE = "database";
-    public static final String TABLE = "table";
-    public static final String STARROCKS_SINK_CONFIG_PREFIX = 
"sink.properties.";
     private static final String LOAD_FORMAT = "format";
     private static final StreamLoadFormat DEFAULT_LOAD_FORMAT = 
StreamLoadFormat.CSV;
     private static final String COLUMN_SEPARATOR = "column_separator";
-    public static final String BATCH_MAX_SIZE = "batch_max_rows";
-    public static final String BATCH_MAX_BYTES = "batch_max_bytes";
-    public static final String BATCH_INTERVAL_MS = "batch_interval_ms";
-    public static final String MAX_RETRIES = "max_retries";
-    public static final String RETRY_BACKOFF_MULTIPLIER_MS = 
"retry_backoff_multiplier_ms";
-    public static final String MAX_RETRY_BACKOFF_MS = "max_retry_backoff_ms";
+
+    public static final Option<List<String>> NODE_URLS = 
Options.key("nodeUrls")
+            .listType()
+            .noDefaultValue()
+            .withDescription("StarRocks cluster address, the format is 
[\"fe_ip:fe_http_port\", ...]");
+
+    public static final Option<String> USERNAME = Options.key("username")
+            .stringType()
+            .noDefaultValue()
+            .withDescription("StarRocks user username");
+
+    public static final Option<String> PASSWORD = Options.key("password")
+            .stringType()
+            .noDefaultValue()
+            .withDescription("StarRocks user password");
+
+    public static final Option<String> LABEL_PREFIX = 
Options.key("labelPrefix")
+            .stringType()
+            .noDefaultValue()
+            .withDescription("The prefix of StarRocks stream load label");
+
+    public static final Option<String> DATABASE = Options.key("database")
+            .stringType()
+            .noDefaultValue()
+            .withDescription("The name of StarRocks database");
+
+    public static final Option<String> TABLE = Options.key("table")
+            .stringType()
+            .noDefaultValue()
+            .withDescription("The name of StarRocks table");
+
+    public static final Option<String> STARROCKS_SINK_CONFIG_PREFIX = 
Options.key("sink.properties.")
+            .stringType()
+            .noDefaultValue()
+            .withDescription("The parameter of the stream load data_desc. " +
+                    "The way to specify the parameter is to add the prefix 
`sink.properties.` to the original stream load parameter name ");
+
+    public static final Option<Integer> BATCH_MAX_SIZE = 
Options.key("batch_max_rows")
+            .intType()
+            .noDefaultValue()

Review Comment:
   Check document again?
   <img width="951" alt="image" 
src="https://user-images.githubusercontent.com/32193458/201453794-0813d460-759f-48bc-92ea-167500ed20a0.png";>
   



##########
seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/sink/StarRocksSink.java:
##########
@@ -53,7 +53,7 @@ public String getPluginName() {
     @Override
     public void prepare(Config pluginConfig) throws PrepareFailException {
         this.pluginConfig = pluginConfig;
-        CheckResult result = CheckConfigUtil.checkAllExists(pluginConfig, 
NODE_URLS, DATABASE, TABLE, USERNAME, PASSWORD);
+        CheckResult result = CheckConfigUtil.checkAllExists(pluginConfig, 
NODE_URLS.key(), DATABASE.key(), TABLE.key(), USERNAME.key(), PASSWORD.key());

Review Comment:
   From the document I found `TABLE` is an option options?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to