You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by pe...@apache.org on 2019/03/10 14:10:25 UTC

[incubator-skywalking] branch master updated: If the node has no interaction, then it disappear in topology. (#2336)

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

pengys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 7c72690  If the node has no interaction, then it disappear in topology. (#2336)
7c72690 is described below

commit 7c726905c3152d368cf363b456651121f453fa7e
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Mar 10 22:10:20 2019 +0800

    If the node has no interaction, then it disappear in topology. (#2336)
---
 .../oap/server/core/query/TopologyQueryService.java | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/TopologyQueryService.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/TopologyQueryService.java
index a571eeb..667941b 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/TopologyQueryService.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/TopologyQueryService.java
@@ -84,30 +84,9 @@ public class TopologyQueryService implements Service {
         List<Call> serviceRelationServerCalls = getTopologyQueryDAO().loadServerSideServiceRelations(step, startTB, endTB);
         List<Call> serviceRelationClientCalls = getTopologyQueryDAO().loadClientSideServiceRelations(step, startTB, endTB);
 
-        List<org.apache.skywalking.oap.server.core.query.entity.Service> serviceList = getMetadataQueryDAO().searchServices(startTimestamp, endTimestamp, Const.EMPTY_STRING);
-
         TopologyBuilder builder = new TopologyBuilder(moduleManager);
         Topology topology = builder.build(serviceRelationClientCalls, serviceRelationServerCalls);
 
-        serviceList.forEach(service -> {
-            boolean contains = false;
-            for (Node node : topology.getNodes()) {
-                if (service.getId() == node.getId()) {
-                    contains = true;
-                    break;
-                }
-            }
-
-            if (!contains) {
-                Node newNode = new Node();
-                newNode.setId(service.getId());
-                newNode.setName(service.getName());
-                newNode.setReal(true);
-                newNode.setType(Const.UNKNOWN);
-                topology.getNodes().add(newNode);
-            }
-        });
-
         return topology;
     }