ACKS : Fix some issues when a transport client was used.

Original commit: elastic/x-pack-elasticsearch@9276820a90
This commit is contained in:
Brian Murphy 2014-11-20 22:24:25 +00:00
parent 42d484b62a
commit 178a701724
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import org.elasticsearch.alerts.rest.RestDeleteAlertAction;
import org.elasticsearch.alerts.rest.RestGetAlertAction; import org.elasticsearch.alerts.rest.RestGetAlertAction;
import org.elasticsearch.alerts.rest.RestPutAlertAction; import org.elasticsearch.alerts.rest.RestPutAlertAction;
import org.elasticsearch.alerts.scheduler.AlertScheduler; import org.elasticsearch.alerts.scheduler.AlertScheduler;
import org.elasticsearch.alerts.transport.actions.ack.TransportAckAlertAction;
import org.elasticsearch.alerts.transport.actions.delete.TransportDeleteAlertAction; import org.elasticsearch.alerts.transport.actions.delete.TransportDeleteAlertAction;
import org.elasticsearch.alerts.transport.actions.get.TransportGetAlertAction; import org.elasticsearch.alerts.transport.actions.get.TransportGetAlertAction;
import org.elasticsearch.alerts.transport.actions.put.TransportPutAlertAction; import org.elasticsearch.alerts.transport.actions.put.TransportPutAlertAction;
@ -41,6 +42,7 @@ public class AlertingModule extends AbstractModule {
bind(TransportDeleteAlertAction.class).asEagerSingleton(); bind(TransportDeleteAlertAction.class).asEagerSingleton();
bind(TransportGetAlertAction.class).asEagerSingleton(); bind(TransportGetAlertAction.class).asEagerSingleton();
bind(TransportAlertStatsAction.class).asEagerSingleton(); bind(TransportAlertStatsAction.class).asEagerSingleton();
bind(TransportAckAlertAction.class).asEagerSingleton();
bind(AlertsClient.class).to(NodeAlertsClient.class).asEagerSingleton(); bind(AlertsClient.class).to(NodeAlertsClient.class).asEagerSingleton();
// Rest layer // Rest layer

View File

@ -46,7 +46,7 @@ public class AckAlertResponse extends ActionResponse {
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
if (in.readBoolean()) { if (in.readBoolean()) {
AlertAckState.fromString(in.readString()); alertAckState = AlertAckState.fromString(in.readString());
} }
} }