Github user siyuanh commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/176#discussion_r51292122
--- Diff:
kafka/src/main/java/org/apache/apex/malhar/kafka/AbstractKafkaInputOperator.java
---
@@ -366,17 +374,19 @@ public String getClusters()
return Joiner.on(';').join(clusters);
}
- public void setTopics(String... topics)
+ public void setTopics(String topics)
{
- this.topics = topics;
+ Topic.validate(topics.replace(" |,", "");
--- End diff --
valid topic + valid topic is valid invalid topic + valid topic is invalid
I know there is one exception here "a b, c" will be treated as valid but
this is just a fast fail. A topic contain space in the middle will eventually
throw exception.
To keep it simple I did this quick shortcut validation.
And there is no false negative
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---