disable restart API
This commit is contained in:
parent
fd9266dbc6
commit
a59912db02
|
@ -21,6 +21,7 @@ package org.elasticsearch.action.admin.cluster.node.restart;
|
|||
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.ElasticSearchIllegalStateException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.TransportActions;
|
||||
import org.elasticsearch.action.support.nodes.NodeOperationRequest;
|
||||
import org.elasticsearch.action.support.nodes.TransportNodesOperationAction;
|
||||
|
@ -63,6 +64,10 @@ public class TransportNodesRestartAction extends TransportNodesOperationAction<N
|
|||
disabled = componentSettings.getAsBoolean("disabled", false);
|
||||
}
|
||||
|
||||
@Override protected void doExecute(NodesRestartRequest nodesRestartRequest, ActionListener<NodesRestartResponse> listener) {
|
||||
listener.onFailure(new ElasticSearchIllegalStateException("restart is disabled (for now) ...."));
|
||||
}
|
||||
|
||||
@Override protected String transportAction() {
|
||||
return TransportActions.Admin.Cluster.Node.RESTART;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue