SteveYurongSu commented on code in PR #12265:
URL: https://github.com/apache/iotdb/pull/12265#discussion_r1546175296


##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/connector/protocol/IoTDBConnector.java:
##########
@@ -84,28 +84,43 @@ public abstract class IoTDBConnector implements 
PipeConnector {
   @Override
   public void validate(PipeParameterValidator validator) throws Exception {
     final PipeParameters parameters = validator.getParameters();
-    validator.validate(
-        args ->
-            (boolean) args[0]
-                || (((boolean) args[1] || (boolean) args[2]) && (boolean) 
args[3])
-                || (boolean) args[4]
-                || (((boolean) args[5] || (boolean) args[6]) && (boolean) 
args[7]),
-        String.format(
-            "One of %s, %s:%s, %s, %s:%s must be specified",
-            CONNECTOR_IOTDB_NODE_URLS_KEY,
-            CONNECTOR_IOTDB_HOST_KEY,
-            CONNECTOR_IOTDB_PORT_KEY,
-            SINK_IOTDB_NODE_URLS_KEY,
-            SINK_IOTDB_HOST_KEY,
-            SINK_IOTDB_PORT_KEY),
-        parameters.hasAttribute(CONNECTOR_IOTDB_NODE_URLS_KEY),
-        parameters.hasAttribute(CONNECTOR_IOTDB_IP_KEY),
-        parameters.hasAttribute(CONNECTOR_IOTDB_HOST_KEY),
-        parameters.hasAttribute(CONNECTOR_IOTDB_PORT_KEY),
-        parameters.hasAttribute(SINK_IOTDB_NODE_URLS_KEY),
-        parameters.hasAttribute(SINK_IOTDB_IP_KEY),
-        parameters.hasAttribute(SINK_IOTDB_HOST_KEY),
-        parameters.hasAttribute(SINK_IOTDB_PORT_KEY));
+    validator
+        .validate(
+            args ->
+                (boolean) args[0]
+                    || (((boolean) args[1] || (boolean) args[2]) && (boolean) 
args[3])
+                    || (boolean) args[4]
+                    || (((boolean) args[5] || (boolean) args[6]) && (boolean) 
args[7]),
+            String.format(
+                "One of %s, %s:%s, %s, %s:%s must be specified",
+                CONNECTOR_IOTDB_NODE_URLS_KEY,
+                CONNECTOR_IOTDB_HOST_KEY,
+                CONNECTOR_IOTDB_PORT_KEY,
+                SINK_IOTDB_NODE_URLS_KEY,
+                SINK_IOTDB_HOST_KEY,
+                SINK_IOTDB_PORT_KEY),
+            parameters.hasAttribute(CONNECTOR_IOTDB_NODE_URLS_KEY),
+            parameters.hasAttribute(CONNECTOR_IOTDB_IP_KEY),
+            parameters.hasAttribute(CONNECTOR_IOTDB_HOST_KEY),
+            parameters.hasAttribute(CONNECTOR_IOTDB_PORT_KEY),
+            parameters.hasAttribute(SINK_IOTDB_NODE_URLS_KEY),
+            parameters.hasAttribute(SINK_IOTDB_IP_KEY),
+            parameters.hasAttribute(SINK_IOTDB_HOST_KEY),
+            parameters.hasAttribute(SINK_IOTDB_PORT_KEY))
+        .validate(
+            args -> args.equals("retry") || args.equals("ignore"),

Review Comment:
   ```suggestion
               arg -> arg.equals("retry") || arg.equals("ignore"),
   ```



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