Search in sources :

Example 1 with ListOperationRequest

use of com.instaclustr.esop.impl.list.ListOperationRequest in project esop by instaclustr.

the class BaseS3Restorer method listManifests.

@Override
public List<Manifest> listManifests() throws Exception {
    // If skipDownload flag is not set, download manifests
    if (this.request instanceof ListOperationRequest) {
        if (!((ListOperationRequest) this.request).skipDownload) {
            StorageLocation location = this.localFileRestorer.getStorageLocation();
            Path downloadDirectory = location.fileBackupDirectory.resolve(this.localFileRestorer.getStorageLocation().bucket);
            downloadManifestsToDirectory(downloadDirectory);
        }
    }
    return localFileRestorer.listManifests();
}
Also used : Path(java.nio.file.Path) ListOperationRequest(com.instaclustr.esop.impl.list.ListOperationRequest) StorageLocation(com.instaclustr.esop.impl.StorageLocation)

Example 2 with ListOperationRequest

use of com.instaclustr.esop.impl.list.ListOperationRequest in project esop by instaclustr.

the class GCPRestorer method listManifests.

@Override
public List<Manifest> listManifests() throws Exception {
    // If skipDownload flag is not set, download manifests
    if (this.request instanceof ListOperationRequest) {
        if (!((ListOperationRequest) this.request).skipDownload) {
            StorageLocation location = this.localFileRestorer.getStorageLocation();
            Path downloadDirectory = location.fileBackupDirectory.resolve(this.localFileRestorer.getStorageLocation().bucket);
            downloadManifestsToDirectory(downloadDirectory);
        }
    }
    return localFileRestorer.listManifests();
}
Also used : Path(java.nio.file.Path) ListOperationRequest(com.instaclustr.esop.impl.list.ListOperationRequest) StorageLocation(com.instaclustr.esop.impl.StorageLocation)

Example 3 with ListOperationRequest

use of com.instaclustr.esop.impl.list.ListOperationRequest in project esop by instaclustr.

the class AzureRestorer method listManifests.

@Override
public List<Manifest> listManifests() throws Exception {
    // If skipDownload flag is not set, download manifests
    if (this.request instanceof ListOperationRequest) {
        if (!((ListOperationRequest) this.request).skipDownload) {
            StorageLocation location = this.localFileRestorer.getStorageLocation();
            Path downloadDirectory = location.fileBackupDirectory.resolve(this.localFileRestorer.getStorageLocation().bucket);
            downloadManifestsToDirectory(downloadDirectory);
        }
    }
    return localFileRestorer.listManifests();
}
Also used : Path(java.nio.file.Path) ListOperationRequest(com.instaclustr.esop.impl.list.ListOperationRequest) StorageLocation(com.instaclustr.esop.impl.StorageLocation)

Example 4 with ListOperationRequest

use of com.instaclustr.esop.impl.list.ListOperationRequest in project esop by instaclustr.

the class S3ListingAndBackupRemovalTest method destroy.

@Override
public void destroy() throws Exception {
    try {
        FileUtils.deleteDirectory(cassandraDir);
    } catch (final Exception ex) {
        logger.error("Unable to remove Cassandra dir " + cassandraDir);
    }
    try {
        ListOperationRequest request = new ListOperationRequest();
        request.storageLocation = new StorageLocation(getStorageLocation());
        new S3BucketService(transferManagerFactory, request).delete(BUCKET_NAME);
    } catch (final Exception ex) {
        logger.error("Unable to remove bucket " + BUCKET_NAME);
    }
}
Also used : ListOperationRequest(com.instaclustr.esop.impl.list.ListOperationRequest) S3BucketService(com.instaclustr.esop.s3.aws.S3BucketService) StorageLocation(com.instaclustr.esop.impl.StorageLocation)

Example 5 with ListOperationRequest

use of com.instaclustr.esop.impl.list.ListOperationRequest in project esop by instaclustr.

the class AzureListingAndBackupRemovalTest method destroy.

@Override
public void destroy() throws Exception {
    try {
        FileUtils.deleteDirectory(cassandraDir);
    } catch (final Exception ex) {
        logger.error("Unable to remove Cassandra dir " + cassandraDir);
    }
    try {
        ListOperationRequest request = new ListOperationRequest();
        request.storageLocation = new StorageLocation(getStorageLocation());
        new AzureBucketService(cloudStorageAccountFactory, request).delete(BUCKET_NAME);
    } catch (final Exception ex) {
        logger.error("Unable to remove bucket " + BUCKET_NAME);
    }
}
Also used : AzureBucketService(com.instaclustr.esop.azure.AzureBucketService) ListOperationRequest(com.instaclustr.esop.impl.list.ListOperationRequest) StorageLocation(com.instaclustr.esop.impl.StorageLocation)

Aggregations

StorageLocation (com.instaclustr.esop.impl.StorageLocation)6 ListOperationRequest (com.instaclustr.esop.impl.list.ListOperationRequest)6 Path (java.nio.file.Path)3 AzureBucketService (com.instaclustr.esop.azure.AzureBucketService)1 GCPBucketService (com.instaclustr.esop.gcp.GCPBucketService)1 S3BucketService (com.instaclustr.esop.s3.aws.S3BucketService)1