use of io.crate.executor.transport.OneRowActionListener in project crate by crate.
the class ESClusterUpdateSettingsTask method execute.
@Override
public void execute(BatchConsumer consumer, Row parameters) {
ClusterUpdateSettingsRequest request = buildESUpdateClusterSettingRequest(buildSettingsFrom(plan.persistentSettings(), parameters), buildSettingsFrom(plan.transientSettings(), parameters));
OneRowActionListener<ClusterUpdateSettingsResponse> actionListener = new OneRowActionListener<>(consumer, TO_ONE_ROW);
transport.execute(request, actionListener);
}
use of io.crate.executor.transport.OneRowActionListener in project crate by crate.
the class CreateAnalyzerTask method execute.
@Override
public void execute(BatchConsumer consumer, Row parameters) {
ClusterUpdateSettingsRequest request = new ClusterUpdateSettingsRequest();
request.persistentSettings(plan.createAnalyzerSettings());
OneRowActionListener<ClusterUpdateSettingsResponse> actionListener = new OneRowActionListener<>(consumer, TO_ONE_ROW);
transport.execute(request, actionListener);
}
use of io.crate.executor.transport.OneRowActionListener in project crate by crate.
the class DDLTask method execute.
@Override
public void execute(final BatchConsumer consumer, Row parameters) {
CompletableFuture<Long> future = ddlStatementDispatcher.dispatch(analyzedStatement, jobId());
OneRowActionListener<Long> responseOneRowActionListener = new OneRowActionListener<>(consumer, new Function<Long, Row>() {
@Nullable
@Override
public Row apply(@Nullable Long input) {
return new Row1(input == null ? -1 : input);
}
});
future.whenComplete(responseOneRowActionListener);
}
Aggregations