You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "XNX02 (via GitHub)" <gi...@apache.org> on 2025/08/21 16:40:53 UTC

[PR] Pipe: fix MQTT Source Session logic & Enhanced error reporting for MQTT port and data path conflicts [iotdb]

XNX02 opened a new pull request, #16229:
URL: https://github.com/apache/iotdb/pull/16229

   (no comment)


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] Pipe: fix MQTT Source Session logic & Enhanced error reporting for MQTT port and data path conflicts [iotdb]

Posted by "XNX02 (via GitHub)" <gi...@apache.org>.
XNX02 commented on code in PR #16229:
URL: https://github.com/apache/iotdb/pull/16229#discussion_r2291613260


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/mqtt/MQTTSource.java:
##########
@@ -86,6 +95,45 @@ public void validate(final PipeParameterValidator validator) throws Exception {
             PipeSourceConstant.EXTERNAL_EXTRACTOR_SINGLE_INSTANCE_PER_NODE_DEFAULT_VALUE)) {
       throw new PipeParameterNotValidException("single mode should be true in MQTT extractor");
     }
+

Review Comment:
   Would it be better to pre-check port using socket.bind and pre-check data path like file.canWrite()?



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] Pipe: fix MQTT Source Session logic & Enhanced error reporting for MQTT port and data path conflicts [iotdb]

Posted by "XNX02 (via GitHub)" <gi...@apache.org>.
XNX02 commented on code in PR #16229:
URL: https://github.com/apache/iotdb/pull/16229#discussion_r2291613260


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/mqtt/MQTTSource.java:
##########
@@ -86,6 +95,45 @@ public void validate(final PipeParameterValidator validator) throws Exception {
             PipeSourceConstant.EXTERNAL_EXTRACTOR_SINGLE_INSTANCE_PER_NODE_DEFAULT_VALUE)) {
       throw new PipeParameterNotValidException("single mode should be true in MQTT extractor");
     }
+

Review Comment:
   Could we just pre-check port using socket.bind and pre-check data path using file.canWrite()?



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] Pipe: fix MQTT Source Session logic & Enhanced error reporting for MQTT port and data path conflicts [iotdb]

Posted by "Caideyipi (via GitHub)" <gi...@apache.org>.
Caideyipi commented on code in PR #16229:
URL: https://github.com/apache/iotdb/pull/16229#discussion_r2292799672


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/mqtt/MQTTSource.java:
##########
@@ -86,6 +95,45 @@ public void validate(final PipeParameterValidator validator) throws Exception {
             PipeSourceConstant.EXTERNAL_EXTRACTOR_SINGLE_INSTANCE_PER_NODE_DEFAULT_VALUE)) {
       throw new PipeParameterNotValidException("single mode should be true in MQTT extractor");
     }
+

Review Comment:
   Of course, we can judge the data path and socket instead of looking for the other MQTT service, because the two may be occupied for other reasons



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] Pipe: fix MQTT Source Session logic & Enhanced error reporting for MQTT port and data path conflicts [iotdb]

Posted by "Caideyipi (via GitHub)" <gi...@apache.org>.
Caideyipi commented on code in PR #16229:
URL: https://github.com/apache/iotdb/pull/16229#discussion_r2293088266


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/mqtt/MQTTSource.java:
##########
@@ -86,6 +100,72 @@ public void validate(final PipeParameterValidator validator) throws Exception {
             PipeSourceConstant.EXTERNAL_EXTRACTOR_SINGLE_INSTANCE_PER_NODE_DEFAULT_VALUE)) {
       throw new PipeParameterNotValidException("single mode should be true in MQTT extractor");
     }
+    final String sqlDialect =
+        validator
+            .getParameters()
+            .getStringOrDefault(
+                SystemConstant.SQL_DIALECT_KEY, SystemConstant.SQL_DIALECT_TREE_VALUE);
+    final String formatType =
+        validator
+            .getParameters()
+            .getStringOrDefault(
+                PipeSourceConstant.MQTT_PAYLOAD_FORMATTER_KEY,
+                SystemConstant.SQL_DIALECT_TREE_VALUE.equals(sqlDialect)
+                    ? PipeSourceConstant.MQTT_PAYLOAD_FORMATTER_TREE_DIALECT_VALUE
+                    : PipeSourceConstant.MQTT_PAYLOAD_FORMATTER_TABLE_DIALECT_VALUE);
+    payloadFormat = PayloadFormatManager.getPayloadFormat(formatType);
+    if (!sqlDialect.equals(payloadFormat.getType())) {

Review Comment:
   Shall not restrict this



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] Pipe: fix MQTT Source Session logic & Enhanced error reporting for MQTT port and data path conflicts [iotdb]

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


-- 
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: reviews-unsubscribe@iotdb.apache.org

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