[Bugfix] fix replica dsl (#708)

This commit is contained in:
night.liang
2022-11-01 10:41:04 +08:00
committed by EricZeng
parent c27786a257
commit 5c9096d564
2 changed files with 45 additions and 31 deletions

View File

@@ -61,7 +61,7 @@ public class ReplicationMetricESDAO extends BaseMetricESDAO {
String aggDsl = buildAggsDSL(metrics, aggType);
String dsl = dslLoaderUtil.getFormatDslByFileName(
DslsConstant.GET_REPLICATION_AGG_SINGLE_METRICS, clusterPhyId, topic, brokerId, partitionId, startTime, endTime, aggDsl);
DslsConstant.GET_REPLICATION_AGG_SINGLE_METRICS, clusterPhyId, brokerId,topic, partitionId, startTime, endTime, aggDsl);
return esOpClient.performRequestWithRouting(String.valueOf(brokerId), realIndex, dsl,
s -> handleSingleESQueryResponse(s, metrics, aggType), 3);

View File

@@ -1,34 +1,48 @@
{
"size": 0,
"query": {
"bool": {
"must": [
{
"term": {
"clusterPhyId": {
"value": %d
}
}
},
{
"term": {
"brokerId": {
"value": %d
}
}
},
{
"range": {
"timestamp": {
"gte": %d,
"lte": %d
}
}
"size":0,
"query":{
"bool":{
"must":[
{
"term":{
"clusterPhyId":{
"value":%d
}
}
},
{
"term":{
"brokerId":{
"value":%d
}
}
},
{
"term":{
"topic":{
"value":"%s"
}
}
},
{
"term":{
"partitionId":{
"value":%d
}
}
},
{
"range":{
"timestamp":{
"gte":%d,
"lte":%d
}
}
}
]
}
]
}
},
"aggs": {
%s
},
"aggs":{
%s
}
}