Unverified Commit 4399c662 authored by 吴晟's avatar 吴晟 Committed by GitHub
Browse files

Make metric value to long to avoid too big integer issue. (#1876)

* Make metric value to long to avoid too big integer issue.

* Update protocol.

* Add a new filter to service number.
parent 5f867ad7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ public class IntValues {
        values.add(e);
    }

    public int findValue(String id, int defaultValue) {
    public long findValue(String id, int defaultValue) {
        for (KVInt value : values) {
            if (value.getId().equals(id)) {
                return value.getValue();
+1 −1
Original line number Diff line number Diff line
@@ -27,5 +27,5 @@ import lombok.*;
@Getter
public class KVInt {
    private String id;
    private int value;
    private long value;
}
+1 −1
Original line number Diff line number Diff line
@@ -28,5 +28,5 @@ import lombok.*;
public class TopNEntity {
    private String name;
    private String id;
    private int value;
    private long value;
}
Compare 1122e97b to c65a23bd
Original line number Diff line number Diff line
Subproject commit 1122e97b5604ae96447bd58ecdb248d7e02952aa
Subproject commit c65a23bd6b9bba8d1df30d4de261624952df2b7b
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ public class AggregationQueryEsDAO extends EsDAO implements IAggregationQueryDAO
            TopNEntity topNEntity = new TopNEntity();
            topNEntity.setId(termsBucket.getKeyAsString());
            Avg value = termsBucket.getAggregations().get(valueCName);
            topNEntity.setValue((int)value.getValue());
            topNEntity.setValue((long)value.getValue());
            topNEntities.add(topNEntity);
        }

Loading