mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-06 05:22:16 +08:00
[Bugfix] fix replica dsl (#708)
This commit is contained in:
@@ -61,7 +61,7 @@ public class ReplicationMetricESDAO extends BaseMetricESDAO {
|
|||||||
String aggDsl = buildAggsDSL(metrics, aggType);
|
String aggDsl = buildAggsDSL(metrics, aggType);
|
||||||
|
|
||||||
String dsl = dslLoaderUtil.getFormatDslByFileName(
|
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,
|
return esOpClient.performRequestWithRouting(String.valueOf(brokerId), realIndex, dsl,
|
||||||
s -> handleSingleESQueryResponse(s, metrics, aggType), 3);
|
s -> handleSingleESQueryResponse(s, metrics, aggType), 3);
|
||||||
|
|||||||
@@ -1,34 +1,48 @@
|
|||||||
{
|
{
|
||||||
"size": 0,
|
"size":0,
|
||||||
"query": {
|
"query":{
|
||||||
"bool": {
|
"bool":{
|
||||||
"must": [
|
"must":[
|
||||||
{
|
{
|
||||||
"term": {
|
"term":{
|
||||||
"clusterPhyId": {
|
"clusterPhyId":{
|
||||||
"value": %d
|
"value":%d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"term": {
|
"term":{
|
||||||
"brokerId": {
|
"brokerId":{
|
||||||
"value": %d
|
"value":%d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"range": {
|
"term":{
|
||||||
"timestamp": {
|
"topic":{
|
||||||
"gte": %d,
|
"value":"%s"
|
||||||
"lte": %d
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"term":{
|
||||||
|
"partitionId":{
|
||||||
|
"value":%d
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range":{
|
||||||
|
"timestamp":{
|
||||||
|
"gte":%d,
|
||||||
|
"lte":%d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"aggs": {
|
"aggs":{
|
||||||
%s
|
%s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user