Skip to content

Commit 2198086

Browse files
committed
Merge branch 'develop'
2 parents 70bee1a + d56655a commit 2198086

File tree

11 files changed

+65
-38
lines changed

11 files changed

+65
-38
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>1.8.1</version>
7+
<version>1.8.1.1</version>
88
<packaging>pom</packaging>
99

1010
<name>SCOUTER APM</name>

scouter.agent.batch/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.github.scouter-project</groupId>
77
<artifactId>scouter-parent</artifactId>
8-
<version>1.8.1</version>
8+
<version>1.8.1.1</version>
99
</parent>
1010

1111
<artifactId>scouter-agent-batch</artifactId>

scouter.agent.host/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>1.8.1</version>
7+
<version>1.8.1.1</version>
88
</parent>
99

1010
<artifactId>scouter-agent-host</artifactId>

scouter.agent.java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>1.8.1</version>
7+
<version>1.8.1.1</version>
88
</parent>
99

1010
<artifactId>scouter-agent-java</artifactId>

scouter.client/src/scouter/client/tags/TagCountUtil.java

Lines changed: 53 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
2-
* Copyright 2015 the original author or authors.
2+
* Copyright 2015 the original author or authors.
33
* @https://github.com/scouter-project/scouter
44
*
5-
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at
88
*
@@ -12,41 +12,39 @@
1212
* distributed under the License is distributed on an "AS IS" BASIS,
1313
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
* See the License for the specific language governing permissions and
15-
* limitations under the License.
15+
* limitations under the License.
1616
*/
1717
package scouter.client.tags;
1818

19-
import java.util.ArrayList;
20-
import java.util.List;
21-
2219
import scouter.client.model.TextProxy;
2320
import scouter.lang.AlertLevel;
2421
import scouter.lang.constants.TagConstants;
2522
import scouter.lang.value.DecimalValue;
26-
import scouter.lang.value.IP4Value;
2723
import scouter.lang.value.ListValue;
2824
import scouter.lang.value.TextHashValue;
2925
import scouter.lang.value.TextValue;
3026
import scouter.lang.value.Value;
3127
import scouter.lang.value.ValueEnum;
3228
import scouter.util.CastUtil;
33-
import scouter.util.IntSet;
34-
import scouter.util.StringSet;
29+
import scouter.util.HashUtil;
30+
31+
import java.util.ArrayList;
32+
import java.util.List;
3533

3634
public class TagCountUtil {
37-
35+
3836
// This should be called background thread.
3937
public static List<String> loadTagString(int serverId, String date, List<Value> vList, String tagName) {
4038
List<String> resultList = new ArrayList<String>();
4139
if (vList.size() == 0) return resultList;
4240
Value sample = vList.get(0);
43-
switch(sample.getValueType()) {
41+
switch (sample.getValueType()) {
4442
case ValueEnum.TEXT_HASH:
4543
ListValue lv = new ListValue();
4644
for (Value v : vList) {
4745
lv.add(CastUtil.cint(v.toJavaObject()));
4846
}
49-
if (tagName.equals(TagConstants.NAME_OBJECT)){
47+
if (tagName.equals(TagConstants.NAME_OBJECT)) {
5048
TextProxy.object.load(date, lv, serverId);
5149
for (int i = 0; i < lv.size(); i++) {
5250
resultList.add(TextProxy.object.getText(lv.getInt(i)));
@@ -81,12 +79,38 @@ public static List<String> loadTagString(int serverId, String date, List<Value>
8179
for (int i = 0; i < lv.size(); i++) {
8280
resultList.add(TextProxy.error.getText(lv.getInt(i)));
8381
}
82+
} else if (tagName.equals(TagConstants.NAME_LOGIN)) {
83+
TextProxy.login.load(date, lv, serverId);
84+
for (int i = 0; i < lv.size(); i++) {
85+
resultList.add(TextProxy.login.getText(lv.getInt(i)));
86+
}
87+
} else if (tagName.equals(TagConstants.NAME_DESC)) {
88+
TextProxy.desc.load(date, lv, serverId);
89+
for (int i = 0; i < lv.size(); i++) {
90+
resultList.add(TextProxy.desc.getText(lv.getInt(i)));
91+
}
8492
}
93+
8594
break;
8695
case ValueEnum.DECIMAL:
96+
ListValue lvDecimal = new ListValue();
97+
for (Value v : vList) {
98+
lvDecimal.add(CastUtil.cint(v.toJavaObject()));
99+
}
100+
87101
if (tagName.equals(TagConstants.NAME_LEVEL)) {
88102
for (Value v : vList) {
89-
resultList.add(AlertLevel.getName((byte)((DecimalValue)v).value));
103+
resultList.add(AlertLevel.getName((byte) ((DecimalValue) v).value));
104+
}
105+
} else if (tagName.equals(TagConstants.NAME_LOGIN)) {
106+
TextProxy.login.load(date, lvDecimal, serverId);
107+
for (int i = 0; i < lvDecimal.size(); i++) {
108+
resultList.add(TextProxy.login.getText(lvDecimal.getInt(i)));
109+
}
110+
} else if (tagName.equals(TagConstants.NAME_DESC)) {
111+
TextProxy.login.load(date, lvDecimal, serverId);
112+
for (int i = 0; i < lvDecimal.size(); i++) {
113+
resultList.add(TextProxy.login.getText(lvDecimal.getInt(i)));
90114
}
91115
} else {
92116
for (Value v : vList) {
@@ -104,38 +128,38 @@ public static List<String> loadTagString(int serverId, String date, List<Value>
104128
resultList.add(v.toString());
105129
}
106130
break;
107-
default :
131+
default:
108132
for (Value v : vList) {
109133
resultList.add(v.toString());
110134
}
111135
break;
112136
}
113137
return resultList;
114138
}
115-
139+
116140
public static Value convertTagToValue(String tagName, String tagValue) {
117141
if (tagName.equals(TagConstants.NAME_OBJECT)
118-
|| tagName.equals(TagConstants.NAME_SERVICE)
119-
|| tagName.equals(TagConstants.NAME_SERVICE_TIME_SUM)
120-
|| tagName.equals(TagConstants.NAME_SERVICE_KBYTE_SUM)
121-
|| tagName.equals(TagConstants.NAME_SERVICE_ERROR_SUM)
122-
|| tagName.equals(TagConstants.NAME_GROUP)
123-
|| tagName.equals(TagConstants.NAME_USER_AGENT)
124-
|| tagName.equals(TagConstants.NAME_REFERER)
125-
|| tagName.equals(TagConstants.NAME_CITY)
126-
|| tagName.equals(TagConstants.NAME_ERROR)
127-
||TagConstants.serviceHashGroup.hasKey(tagName)
128-
) {
142+
|| tagName.equals(TagConstants.NAME_SERVICE)
143+
|| tagName.equals(TagConstants.NAME_SERVICE_TIME_SUM)
144+
|| tagName.equals(TagConstants.NAME_SERVICE_KBYTE_SUM)
145+
|| tagName.equals(TagConstants.NAME_SERVICE_ERROR_SUM)
146+
|| tagName.equals(TagConstants.NAME_GROUP)
147+
|| tagName.equals(TagConstants.NAME_USER_AGENT)
148+
|| tagName.equals(TagConstants.NAME_REFERER)
149+
|| tagName.equals(TagConstants.NAME_CITY)
150+
|| tagName.equals(TagConstants.NAME_ERROR)
151+
|| TagConstants.serviceHashGroup.hasKey(tagName)
152+
) {
129153
return new TextHashValue(tagValue);
130154
// } else if (tagName.equals(TagConstants.NAME_USERID)
131155
// || tagName.equals(TagConstants.NAME_ELAPSED)
132156
// || tagName.equals(TagConstants.NAME_SQLTIME)
133157
// || tagName.equals(TagConstants.NAME_APITIME)){
134158
// return new DecimalValue(Long.valueOf(tagValue));
135-
} else if(tagName.equals(TagConstants.NAME_LEVEL)) {
159+
} else if (tagName.equals(TagConstants.NAME_LEVEL)) {
136160
return new DecimalValue(AlertLevel.getValue(tagValue));
137-
// } else if (tagName.equals(TagConstants.NAME_IP)) {
138-
// return new IP4Value(tagValue);
161+
} else if (tagName.equals(TagConstants.NAME_LOGIN) || tagName.equals(TagConstants.NAME_DESC)) {
162+
return new DecimalValue(HashUtil.hash(tagValue));
139163
}
140164
return new TextValue(tagValue);
141165
}

scouter.common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>1.8.1</version>
7+
<version>1.8.1.1</version>
88
</parent>
99

1010
<artifactId>scouter-common</artifactId>

scouter.deploy/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>1.8.1</version>
7+
<version>1.8.1.1</version>
88
</parent>
99

1010
<artifactId>scouter-deploy</artifactId>

scouter.server.boot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>1.8.1</version>
7+
<version>1.8.1.1</version>
88
</parent>
99

1010
<artifactId>scouter-server-boot</artifactId>

scouter.server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>1.8.1</version>
7+
<version>1.8.1.1</version>
88
</parent>
99

1010
<artifactId>scouter-server</artifactId>

scouter.webapp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>scouter-parent</artifactId>
77
<groupId>io.github.scouter-project</groupId>
8-
<version>1.8.1</version>
8+
<version>1.8.1.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

0 commit comments

Comments
 (0)