Search in sources :

Example 6 with TarImpl

use of com.yelp.nrtsearch.server.backup.TarImpl in project nrtsearch by Yelp.

the class FailedBackupCleanupTest method setup.

@Before
public void setup() throws IOException {
    archiverDirectory = Paths.get(folder.getRoot().toString(), "archiver");
    s3TransferStartedLatch = new CountDownLatch(1);
    s3 = new DoNothingAndWaitAmazonS3(s3TransferStartedLatch);
    archiver = new ArchiverImpl(s3, BUCKET_NAME, archiverDirectory, new TarImpl(Tar.CompressionMode.LZ4));
    luceneServerConfiguration = LuceneServerTestConfigurationFactory.getConfig(Mode.PRIMARY, folder.getRoot(), archiverDirectory);
    grpcServer = setUpGrpcServer();
}
Also used : ArchiverImpl(com.yelp.nrtsearch.server.backup.ArchiverImpl) CountDownLatch(java.util.concurrent.CountDownLatch) TarImpl(com.yelp.nrtsearch.server.backup.TarImpl) Before(org.junit.Before)

Example 7 with TarImpl

use of com.yelp.nrtsearch.server.backup.TarImpl in project nrtsearch by Yelp.

the class WarmerTest method setup.

@Before
public void setup() throws IOException {
    Path s3Directory = folder.newFolder("s3").toPath();
    Path archiverDirectory = folder.newFolder("archiver").toPath();
    api = S3Mock.create(8011, s3Directory.toAbsolutePath().toString());
    api.start();
    s3 = new AmazonS3Client(new AnonymousAWSCredentials());
    s3.setEndpoint("http://127.0.0.1:8011");
    String bucketName = "warmer-unittest";
    s3.createBucket(bucketName);
    archiver = new ArchiverImpl(s3, bucketName, archiverDirectory, new TarImpl(TarImpl.CompressionMode.LZ4));
    warmer = new Warmer(archiver, service, index, 2);
}
Also used : Path(java.nio.file.Path) AmazonS3Client(com.amazonaws.services.s3.AmazonS3Client) ArchiverImpl(com.yelp.nrtsearch.server.backup.ArchiverImpl) AnonymousAWSCredentials(com.amazonaws.auth.AnonymousAWSCredentials) TarImpl(com.yelp.nrtsearch.server.backup.TarImpl) Before(org.junit.Before)

Example 8 with TarImpl

use of com.yelp.nrtsearch.server.backup.TarImpl in project nrtsearch by Yelp.

the class LuceneServerTest method setUpArchiver.

private Archiver setUpArchiver() throws IOException {
    Path s3Directory = folder.newFolder("s3").toPath();
    Path archiverDirectory = folder.newFolder("archiver").toPath();
    api = S3Mock.create(8011, s3Directory.toAbsolutePath().toString());
    api.start();
    s3 = new AmazonS3Client(new AnonymousAWSCredentials());
    s3.setEndpoint("http://127.0.0.1:8011");
    String bucketName = "warmer-unittest";
    s3.createBucket(bucketName);
    return new ArchiverImpl(s3, bucketName, archiverDirectory, new TarImpl(TarImpl.CompressionMode.LZ4));
}
Also used : Path(java.nio.file.Path) AmazonS3Client(com.amazonaws.services.s3.AmazonS3Client) ArchiverImpl(com.yelp.nrtsearch.server.backup.ArchiverImpl) AnonymousAWSCredentials(com.amazonaws.auth.AnonymousAWSCredentials) TarImpl(com.yelp.nrtsearch.server.backup.TarImpl)

Example 9 with TarImpl

use of com.yelp.nrtsearch.server.backup.TarImpl in project nrtsearch by Yelp.

the class ReplicationTestFailureScenarios method setUp.

@Before
public void setUp() throws IOException {
    // setup S3 for backup/restore
    s3Directory = folder.newFolder("s3").toPath();
    archiverDirectory = folder.newFolder("archiver").toPath();
    api = S3Mock.create(8011, s3Directory.toAbsolutePath().toString());
    api.start();
    s3 = new AmazonS3Client(new AnonymousAWSCredentials());
    s3.setEndpoint("http://127.0.0.1:8011");
    s3.createBucket(BUCKET_NAME);
    archiver = new ArchiverImpl(s3, BUCKET_NAME, archiverDirectory, new TarImpl(Tar.CompressionMode.LZ4));
    startPrimaryServer();
    startSecondaryServer();
}
Also used : AmazonS3Client(com.amazonaws.services.s3.AmazonS3Client) ArchiverImpl(com.yelp.nrtsearch.server.backup.ArchiverImpl) AnonymousAWSCredentials(com.amazonaws.auth.AnonymousAWSCredentials) TarImpl(com.yelp.nrtsearch.server.backup.TarImpl) Before(org.junit.Before)

Aggregations

TarImpl (com.yelp.nrtsearch.server.backup.TarImpl)9 AnonymousAWSCredentials (com.amazonaws.auth.AnonymousAWSCredentials)8 AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)8 ArchiverImpl (com.yelp.nrtsearch.server.backup.ArchiverImpl)8 Before (org.junit.Before)7 LuceneServerConfiguration (com.yelp.nrtsearch.server.config.LuceneServerConfiguration)3 Path (java.nio.file.Path)3 GlobalState (com.yelp.nrtsearch.server.luceneserver.GlobalState)2 AmazonS3 (com.amazonaws.services.s3.AmazonS3)1 TransferManager (com.amazonaws.services.s3.transfer.TransferManager)1 ContentDownloader (com.yelp.nrtsearch.server.backup.ContentDownloader)1 ContentDownloaderImpl (com.yelp.nrtsearch.server.backup.ContentDownloaderImpl)1 FileCompressAndUploader (com.yelp.nrtsearch.server.backup.FileCompressAndUploader)1 IndexArchiver (com.yelp.nrtsearch.server.backup.IndexArchiver)1 VersionManager (com.yelp.nrtsearch.server.backup.VersionManager)1 CountDownLatch (java.util.concurrent.CountDownLatch)1