Caideyipi commented on code in PR #12275:
URL: https://github.com/apache/iotdb/pull/12275#discussion_r1549565209
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/SubscriptionSession.java:
##########
@@ -77,14 +81,14 @@ public void createTopic(String topicName)
executeNonQueryStatement(sql);
}
- public void createTopic(String topicName, Properties config)
+ public void createTopic(String topicName, Properties properties)
throws IoTDBConnectionException, StatementExecutionException {
- if (config.isEmpty()) {
+ if (properties.isEmpty()) {
Review Comment:
There are maybe other "config"s in subscription module.
##########
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/subscription/exception/SubscriptionPollTimeOutException.java:
##########
@@ -28,4 +30,16 @@ public SubscriptionPollTimeOutException(String message) {
protected SubscriptionPollTimeOutException(String message, long timeStamp) {
super(message, timeStamp);
}
+
+ @Override
+ public boolean equals(Object obj) {
+ return obj instanceof SubscriptionException
Review Comment:
Also change this
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/SubscriptionConsumer.java:
##########
@@ -272,6 +536,18 @@ public Builder consumerGroupId(String consumerGroupId) {
return this;
}
+ public Builder heartbeatInterval(int heartbeatInterval) {
Review Comment:
There can be "ms"s too.
##########
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/subscription/config/ConsumerConstant.java:
##########
@@ -25,20 +25,33 @@ public class ConsumerConstant {
public static final String HOST_KEY = "host";
public static final String PORT_KEY = "port";
+ public static final String NODE_URLS_KEY = "node-urls";
+
public static final String USERNAME_KEY = "username";
public static final String PASSWORD_KEY = "password";
public static final String CONSUMER_ID_KEY = "consumer-id";
public static final String CONSUMER_GROUP_ID_KEY = "group-id";
+ /////////////////////////////// hidden ///////////////////////////////
+
+ public static final String HEARTBEAT_INTERVAL_MS_KEY =
"heartbeat-interval-ms"; // unit: ms
Review Comment:
The comment may not be necessary now.
##########
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/subscription/exception/SubscriptionParameterNotValidException.java:
##########
@@ -17,24 +17,30 @@
* under the License.
*/
-package org.apache.iotdb.rpc.subscription;
+package org.apache.iotdb.rpc.subscription.exception;
import java.util.Objects;
-public class SubscriptionException extends RuntimeException {
+public class SubscriptionParameterNotValidException extends
SubscriptionException {
- public SubscriptionException(String message) {
+ public SubscriptionParameterNotValidException(String message) {
super(message);
}
+ protected SubscriptionParameterNotValidException(String message, long
timeStamp) {
+ super(message, timeStamp);
+ }
+
@Override
public boolean equals(Object obj) {
return obj instanceof SubscriptionException
Review Comment:
Also change 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]