master_timeout parameter is now taken into account when calling cluster pending tasks api through the REST layer
Closes #4806
This commit is contained in:
parent
3a558972b2
commit
55a247e257
|
@ -11,6 +11,10 @@
|
|||
"local": {
|
||||
"type": "boolean",
|
||||
"description": "Return local information, do not retrieve the state from master node (default: false)"
|
||||
},
|
||||
"master_timeout": {
|
||||
"type": "time",
|
||||
"description": "Specify timeout for connection to master"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -44,6 +44,7 @@ public class RestPendingClusterTasksAction extends BaseRestHandler {
|
|||
@Override
|
||||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
PendingClusterTasksRequest pendingClusterTasksRequest = new PendingClusterTasksRequest();
|
||||
pendingClusterTasksRequest.masterNodeTimeout(request.paramAsTime("master_timeout", pendingClusterTasksRequest.masterNodeTimeout()));
|
||||
pendingClusterTasksRequest.local(request.paramAsBoolean("local", pendingClusterTasksRequest.local()));
|
||||
client.admin().cluster().pendingClusterTasks(pendingClusterTasksRequest, new ActionListener<PendingClusterTasksResponse>() {
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ public class RestPendingClusterTasksAction extends AbstractCatAction {
|
|||
@Override
|
||||
public void doRequest(final RestRequest request, final RestChannel channel) {
|
||||
PendingClusterTasksRequest pendingClusterTasksRequest = new PendingClusterTasksRequest();
|
||||
pendingClusterTasksRequest.masterNodeTimeout(request.paramAsTime("master_timeout", pendingClusterTasksRequest.masterNodeTimeout()));
|
||||
pendingClusterTasksRequest.local(request.paramAsBoolean("local", pendingClusterTasksRequest.local()));
|
||||
client.admin().cluster().pendingClusterTasks(pendingClusterTasksRequest, new ActionListener<PendingClusterTasksResponse>() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue