You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/12/22 03:24:41 UTC

[inlong] branch master updated: [INLONG-7011][Manager] Check Pulsar non-partition table if exist (#7012)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 9760e3e8c [INLONG-7011][Manager] Check Pulsar non-partition table if exist (#7012)
9760e3e8c is described below

commit 9760e3e8c08d20c1a035faaa9f51dddee8f3fb79
Author: featzhang <de...@gmail.com>
AuthorDate: Thu Dec 22 11:24:36 2022 +0800

    [INLONG-7011][Manager] Check Pulsar non-partition table if exist (#7012)
---
 .../manager/service/resource/queue/pulsar/PulsarOperator.java       | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/pulsar/PulsarOperator.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/pulsar/PulsarOperator.java
index b82074d74..975c9e4bb 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/pulsar/PulsarOperator.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/pulsar/PulsarOperator.java
@@ -292,6 +292,12 @@ public class PulsarOperator {
             }
             for (String t : topicList) {
                 t = t.substring(t.lastIndexOf("/") + 1); // not contains /
+                if (!isPartitioned) {
+                    int suffixIndex = t.lastIndexOf("-partition-");
+                    if (suffixIndex > 0) {
+                        t = t.substring(0, suffixIndex);
+                    }
+                }
                 if (topicName.equals(t)) {
                     topicExists = true;
                     break;