You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/18 14:04:46 UTC

[GitHub] [incubator-inlong] healchow commented on a change in pull request #3232: [INLONG-3231][DataProxy] Change the default topic to an optional configuration

healchow commented on a change in pull request #3232:
URL: https://github.com/apache/incubator-inlong/pull/3232#discussion_r830031117



##########
File path: inlong-dataproxy/conf/dataproxy-pulsar.conf
##########
@@ -42,12 +42,12 @@ agent1.sources.tcp-source.msg-factory-name = org.apache.inlong.dataproxy.source.
 agent1.sources.tcp-source.host = 0.0.0.0
 agent1.sources.tcp-source.port = 46801
 agent1.sources.tcp-source.max-msg-length = 524288
-agent1.sources.tcp-source.topic = test1
+#agent1.sources.tcp-source.topic = test1

Review comment:
       Why not remove this line?

##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/BaseSource.java
##########
@@ -240,12 +240,12 @@ public void configure(Context context) {
 
     filterEmptyMsg = context.getBoolean(ConfigConstants.FILTER_EMPTY_MSG, false);
 
-    topic = context.getString(ConfigConstants.TOPIC);
+    topic = context.getString(ConfigConstants.TOPIC, "");
     attr = context.getString(ConfigConstants.ATTR);
-    Configurables.ensureRequiredNonNull(context, ConfigConstants.TOPIC, ConfigConstants.ATTR);
+    Configurables.ensureRequiredNonNull(context, ConfigConstants.ATTR);
 
     topic = topic.trim();
-    Preconditions.checkArgument(!topic.isEmpty(), "topic is empty");
+    //Preconditions.checkArgument(!topic.isEmpty(), "topic is empty");

Review comment:
       If not needed, pls remove unused codes.




-- 
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: commits-unsubscribe@inlong.apache.org

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