use of org.elasticsearch.indices.recovery.BlobStartPrefixResponse in project crate by crate.
the class BlobRecoveryHandler method getExistingDigestsFromTarget.
private Set<BytesArray> getExistingDigestsFromTarget(byte prefix) {
var listener = new PlainActionFuture<BlobStartPrefixResponse>();
transportService.sendRequest(request.targetNode(), BlobRecoveryTarget.Actions.START_PREFIX, new BlobStartPrefixSyncRequest(request.recoveryId(), request.shardId(), prefix), TransportRequestOptions.EMPTY, new ActionListenerResponseHandler<>(listener, BlobStartPrefixResponse::new));
BlobStartPrefixResponse response = listener.actionGet();
Set<BytesArray> result = new HashSet<>();
for (byte[] digests : response.existingDigests) {
result.add(new BytesArray(digests));
}
return result;
}
Aggregations