wardlican commented on a change in pull request #2186:
URL: https://github.com/apache/incubator-inlong/pull/2186#discussion_r788338181
##########
File path:
inlong-sdk/sort-sdk/src/main/java/org/apache/inlong/sdk/sort/impl/InLongTopicManagerImpl.java
##########
@@ -100,6 +106,25 @@ public InLongTopicFetcher addFetcher(InLongTopic
inLongTopic) {
}
}
+ /**
+ * create fetcher (pulsar,tube,kafka)
+ *
+ * @param inLongTopic {@link InLongTopic}
+ * @return {@link InLongTopicFetcher}
+ */
+ private InLongTopicFetcher createInLongTopicFetcher(InLongTopic
inLongTopic) {
+ if
(InlongTopicTypeEnum.PULSAR.getName().equals(inLongTopic.getTopicType())) {
+ logger.info("the topic is pulsar {}", inLongTopic);
+ return new InLongPulsarFetcherImpl(inLongTopic, context);
+ } else if
(InlongTopicTypeEnum.TUBE.getName().equals(inLongTopic.getTopicType())) {
Review comment:
Here, the type and type of topic are predictable, and switch case is not
required
--
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]