You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2021/12/29 12:48:38 UTC
[incubator-inlong] branch master updated: [INLONG-2078] create partition topic for serial model (#2079)
This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 8e73eb4 [INLONG-2078] create partition topic for serial model (#2079)
8e73eb4 is described below
commit 8e73eb448dccd0bde2a781e127c534ae71ac6b75
Author: dockerzhang <do...@apache.org>
AuthorDate: Wed Dec 29 20:48:31 2021 +0800
[INLONG-2078] create partition topic for serial model (#2079)
---
.../inlong/manager/service/thirdpart/mq/PulsarOptServiceImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdpart/mq/PulsarOptServiceImpl.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdpart/mq/PulsarOptServiceImpl.java
index 488a503..e7f4d85 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdpart/mq/PulsarOptServiceImpl.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdpart/mq/PulsarOptServiceImpl.java
@@ -143,10 +143,10 @@ public class PulsarOptServiceImpl implements PulsarOptService {
try {
String queueModule = topicBean.getQueueModule();
- // create non-partition topic
+ // create partition topic
if (BizConstant.PULSAR_TOPIC_TYPE_SERIAL.equalsIgnoreCase(queueModule)) {
- pulsarAdmin.topics().createNonPartitionedTopic(topicFullName);
- } else { // create partition topic
+ pulsarAdmin.topics().createPartitionedTopic(topicFullName, 1);
+ } else {
List<String> clusters = PulsarUtils.getPulsarClusters(pulsarAdmin);
// The number of brokers as the default value of topic partition
List<String> brokers = pulsarAdmin.brokers().getActiveBrokers(clusters.get(0));