From e53c3d89436cedea2abaa38f1cd0a0726ff07e54 Mon Sep 17 00:00:00 2001 From: Chisu Yu Date: Wed, 30 Oct 2013 05:50:57 +0000 Subject: [PATCH] =?UTF-8?q?[=EC=9C=A0=EC=B9=98=EC=88=98]=20[NOBTS]=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=EB=A7=B5=EC=9D=98=20=EC=96=B4=ED=94=8C?= =?UTF-8?q?=EB=A6=AC=EC=BC=80=EC=9D=B4=EC=85=98=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=B0=BD=EC=97=90=20=EB=AC=BC=EB=A6=AC?= =?UTF-8?q?=EC=84=9C=EB=B2=84=EC=97=90=20=ED=8F=AC=ED=8A=B8=EB=B2=88?= =?UTF-8?q?=ED=98=B8=EA=B0=80=20=EB=B6=99=EC=96=B4=EC=84=9C=20group=20by?= =?UTF-8?q?=EA=B0=80=20=EC=9E=98=EB=AA=BB=EB=90=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@2651 84d0f5b1-2673-498c-a247-62c4ff18d310 --- .../web/applicationmap/Application.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/nhn/pinpoint/web/applicationmap/Application.java b/src/main/java/com/nhn/pinpoint/web/applicationmap/Application.java index 3293c2cf1..9ca0abc28 100644 --- a/src/main/java/com/nhn/pinpoint/web/applicationmap/Application.java +++ b/src/main/java/com/nhn/pinpoint/web/applicationmap/Application.java @@ -47,24 +47,30 @@ public class Application implements Comparable, Mergeable hostHistogram) { if (hostHistogram == null) { return; } for (Entry entry : hostHistogram.entrySet()) { - String name = entry.getKey(); + String instanceName = entry.getKey(); + int pos = instanceName.indexOf(':'); + String hostName = (pos > 0) ? instanceName.substring(0, pos) : instanceName; ServiceType serviceType = entry.getValue().getServiceType(); - MergeableMap serverInstanceMap = serverInstanceList.get(name); - - ServerInstance serverInstance = new ServerInstance(name, serviceType, null); + ServerInstance serverInstance = new ServerInstance(instanceName, serviceType, null); + MergeableMap serverInstanceMap = serverInstanceList.get(hostName); if (serverInstanceMap == null) { MergeableMap value = new MergeableTreeMap(); value.put(serverInstance.getId(), serverInstance); - serverInstanceList.put(name, value); + serverInstanceList.put(hostName, value); } else { - MergeableMap map = serverInstanceList.get(name); + MergeableMap map = serverInstanceList.get(hostName); map.putOrMerge(serverInstance.getId(), serverInstance); } }