Search in sources :

Example 1 with BlobRecoveryDeleteRequest

use of org.elasticsearch.indices.recovery.BlobRecoveryDeleteRequest in project crate by crate.

the class BlobRecoveryHandler method deleteFilesRequest.

private void deleteFilesRequest(BytesArray[] digests) {
    var listener = new PlainActionFuture<TransportResponse>();
    transportService.sendRequest(request.targetNode(), BlobRecoveryTarget.Actions.DELETE_FILE, new BlobRecoveryDeleteRequest(request.recoveryId(), digests), TransportRequestOptions.EMPTY, new ActionListenerResponseHandler<>(listener, in -> TransportResponse.Empty.INSTANCE));
    listener.actionGet();
}
Also used : ElasticsearchException(org.elasticsearch.ElasticsearchException) CancellableThreads(org.elasticsearch.common.util.CancellableThreads) StartRecoveryRequest(org.elasticsearch.indices.recovery.StartRecoveryRequest) BlobIndex(io.crate.blob.v2.BlobIndex) BlobRecoveryTarget(org.elasticsearch.indices.recovery.BlobRecoveryTarget) IndexShardClosedException(org.elasticsearch.index.shard.IndexShardClosedException) BlobShard(io.crate.blob.v2.BlobShard) BlobRecoveryDeleteRequest(org.elasticsearch.indices.recovery.BlobRecoveryDeleteRequest) AtomicReference(java.util.concurrent.atomic.AtomicReference) RecoveryTargetHandler(org.elasticsearch.indices.recovery.RecoveryTargetHandler) BytesArray(org.elasticsearch.common.bytes.BytesArray) RecoverySourceHandler(org.elasticsearch.indices.recovery.RecoverySourceHandler) HashSet(java.util.HashSet) BlobRecoveryStartTransferRequest(org.elasticsearch.indices.recovery.BlobRecoveryStartTransferRequest) ActionListenerResponseHandler(org.elasticsearch.action.ActionListenerResponseHandler) BlobStartPrefixResponse(org.elasticsearch.indices.recovery.BlobStartPrefixResponse) BlobStartPrefixSyncRequest(org.elasticsearch.indices.recovery.BlobStartPrefixSyncRequest) TransportResponse(org.elasticsearch.transport.TransportResponse) TransportService(org.elasticsearch.transport.TransportService) BlobContainer(io.crate.blob.BlobContainer) IndexShardState(org.elasticsearch.index.shard.IndexShardState) BlobRecoveryChunkRequest(org.elasticsearch.indices.recovery.BlobRecoveryChunkRequest) BlobStartRecoveryRequest(org.elasticsearch.indices.recovery.BlobStartRecoveryRequest) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) IndexShard(org.elasticsearch.index.shard.IndexShard) Set(java.util.Set) IOException(java.io.IOException) BlobIndicesService(io.crate.blob.v2.BlobIndicesService) StopWatch(org.elasticsearch.common.StopWatch) FileInputStream(java.io.FileInputStream) BytesReference(org.elasticsearch.common.bytes.BytesReference) Hex(io.crate.common.Hex) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) BlobTransferTarget(io.crate.blob.BlobTransferTarget) CountDownLatch(java.util.concurrent.CountDownLatch) Logger(org.apache.logging.log4j.Logger) BlobFinalizeRecoveryRequest(org.elasticsearch.indices.recovery.BlobFinalizeRecoveryRequest) TransportRequestOptions(org.elasticsearch.transport.TransportRequestOptions) LogManager(org.apache.logging.log4j.LogManager) PlainActionFuture(org.elasticsearch.action.support.PlainActionFuture) BlobRecoveryDeleteRequest(org.elasticsearch.indices.recovery.BlobRecoveryDeleteRequest)

Aggregations

BlobContainer (io.crate.blob.BlobContainer)1 BlobTransferTarget (io.crate.blob.BlobTransferTarget)1 BlobIndex (io.crate.blob.v2.BlobIndex)1 BlobIndicesService (io.crate.blob.v2.BlobIndicesService)1 BlobShard (io.crate.blob.v2.BlobShard)1 Hex (io.crate.common.Hex)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 TimeUnit (java.util.concurrent.TimeUnit)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 LogManager (org.apache.logging.log4j.LogManager)1 Logger (org.apache.logging.log4j.Logger)1 ElasticsearchException (org.elasticsearch.ElasticsearchException)1 ActionListenerResponseHandler (org.elasticsearch.action.ActionListenerResponseHandler)1 PlainActionFuture (org.elasticsearch.action.support.PlainActionFuture)1 StopWatch (org.elasticsearch.common.StopWatch)1