use of com.yelp.nrtsearch.server.backup.FileCompressAndUploader in project nrtsearch by Yelp.
the class RemoteStateBackendTest 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();
AmazonS3 s3 = new AmazonS3Client(new AnonymousAWSCredentials());
s3.setEndpoint("http://127.0.0.1:8011");
s3.createBucket(TEST_BUCKET);
TransferManager transferManager = TransferManagerBuilder.standard().withS3Client(s3).withShutDownThreadPools(false).build();
ContentDownloader contentDownloader = new ContentDownloaderImpl(new TarImpl(TarImpl.CompressionMode.LZ4), transferManager, TEST_BUCKET, true);
FileCompressAndUploader fileCompressAndUploader = new FileCompressAndUploader(new TarImpl(TarImpl.CompressionMode.LZ4), transferManager, TEST_BUCKET);
versionManager = new VersionManager(s3, TEST_BUCKET);
archiver = new IndexArchiver(mock(BackupDiffManager.class), fileCompressAndUploader, contentDownloader, versionManager, archiverDirectory);
}
Aggregations