use of io.crate.execution.ddl.index.SwapAndDropIndexRequest in project crate by crate.
the class AlterTableOperation method swapAndDropIndex.
private CompletableFuture<Long> swapAndDropIndex(String source, String target) {
SwapAndDropIndexRequest request = new SwapAndDropIndexRequest(source, target);
FutureActionListener<AcknowledgedResponse, Long> listener = new FutureActionListener<>(response -> {
if (!response.isAcknowledged()) {
throw new RuntimeException("Publishing new cluster state during Shrink operation (rename phase) " + "has timed out");
}
return 0L;
});
transportSwapAndDropIndexNameAction.execute(request, listener);
return listener;
}
Aggregations