disable restart API

This commit is contained in:
kimchy 2010-09-23 00:02:12 +02:00
parent fd9266dbc6
commit a59912db02
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}