mirror of https://github.com/apache/druid.git
Fix maxCompletedTasks parameter in OverlordClientImpl. (#14667)
It was sent to the server as "maxCompletedTasks", but the server expects "max". This caused it to be ignored. This bug was introduced in #14581.
This commit is contained in:
parent
add9796d46
commit
4a68f8a294
|
@ -147,7 +147,7 @@ public class OverlordClientImpl implements OverlordClient
|
|||
}
|
||||
|
||||
if (maxCompletedTasks != null) {
|
||||
pathBuilder.append(params == 0 ? '?' : '&').append("maxCompletedTasks=").append(maxCompletedTasks);
|
||||
pathBuilder.append(params == 0 ? '?' : '&').append("max=").append(maxCompletedTasks);
|
||||
}
|
||||
|
||||
return FutureUtils.transform(
|
||||
|
|
|
@ -184,7 +184,7 @@ public class OverlordClientImplTest
|
|||
serviceClient.expectAndRespond(
|
||||
new RequestBuilder(
|
||||
HttpMethod.GET,
|
||||
"/druid/indexer/v1/tasks?state=RUNNING&datasource=foo%3F&maxCompletedTasks=0"
|
||||
"/druid/indexer/v1/tasks?state=RUNNING&datasource=foo%3F&max=0"
|
||||
),
|
||||
HttpResponseStatus.OK,
|
||||
ImmutableMap.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON),
|
||||
|
@ -203,7 +203,7 @@ public class OverlordClientImplTest
|
|||
serviceClient.expectAndRespond(
|
||||
new RequestBuilder(
|
||||
HttpMethod.GET,
|
||||
"/druid/indexer/v1/tasks?maxCompletedTasks=0"
|
||||
"/druid/indexer/v1/tasks?max=0"
|
||||
),
|
||||
HttpResponseStatus.OK,
|
||||
ImmutableMap.of(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON),
|
||||
|
|
Loading…
Reference in New Issue