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 2022/09/13 02:47:25 UTC

[inlong] branch release-1.3.0 updated: [INLONG-5844][Manager] Sub sources should be filtered when querying task status (#5845)

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

healchow pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/release-1.3.0 by this push:
     new e67adc4e7 [INLONG-5844][Manager] Sub sources should be filtered when querying task status (#5845)
e67adc4e7 is described below

commit e67adc4e75c8c5b294c6ebc91fa71aee1934f38e
Author: woofyzhao <49...@qq.com>
AuthorDate: Sat Sep 10 12:31:01 2022 +0800

    [INLONG-5844][Manager] Sub sources should be filtered when querying task status (#5845)
    
    Co-authored-by: healchow <he...@gmail.com>
---
 .../java/org/apache/inlong/manager/client/api/InlongGroupContext.java | 4 +++-
 .../main/java/org/apache/inlong/manager/pojo/source/StreamSource.java | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java
index 3ba3a0aec..52cca26a7 100644
--- a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java
+++ b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java
@@ -90,7 +90,9 @@ public class InlongGroupContext implements Serializable {
             if (MapUtils.isNotEmpty(sources)) {
                 for (Map.Entry<String, StreamSource> entry : sources.entrySet()) {
                     StreamSource source = entry.getValue();
-                    if (source != null) {
+                    // when template id is null it is considered as normal source other than template source
+                    // sub sources are filtered because they are already collected in template source's sub source list
+                    if (source != null && source.getTemplateId() == null) {
                         groupSources.add(source);
                     }
                 }
diff --git a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/source/StreamSource.java b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/source/StreamSource.java
index 9c07d7969..a95dd6d5b 100644
--- a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/source/StreamSource.java
+++ b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/source/StreamSource.java
@@ -104,6 +104,9 @@ public abstract class StreamSource extends StreamNode {
     @Builder.Default
     private Map<String, Object> properties = new LinkedHashMap<>();
 
+    @ApiModelProperty("Null if not a sub source")
+    private Integer templateId;
+
     @ApiModelProperty("Sub source information of existing agents")
     private List<SubSourceDTO> subSourceList;