use of com.facebook.presto.raptor.filesystem.LocalFileStorageService in project presto by prestodb.
the class TestShardRecovery method setup.
@BeforeMethod
public void setup() {
temporary = createTempDir();
File directory = new File(temporary, "data");
File backupDirectory = new File(temporary, "backup");
backupStore = new FileBackupStore(backupDirectory);
backupStore.start();
storageService = new LocalFileStorageService(new LocalOrcDataEnvironment(), directory.toURI());
storageService.start();
IDBI dbi = new DBI("jdbc:h2:mem:test" + System.nanoTime() + "_" + ThreadLocalRandom.current().nextInt());
dummyHandle = dbi.open();
createTablesWithRetry(dbi);
ShardManager shardManager = createShardManager(dbi);
recoveryManager = createShardRecoveryManager(storageService, Optional.of(backupStore), shardManager);
}
use of com.facebook.presto.raptor.filesystem.LocalFileStorageService in project presto by prestodb.
the class TestBackupManager method setup.
@BeforeMethod
public void setup() {
temporary = createTempDir();
FileBackupStore fileStore = new FileBackupStore(new File(temporary, "backup"));
fileStore.start();
backupStore = new TestingBackupStore(fileStore);
storageService = new LocalFileStorageService(new LocalOrcDataEnvironment(), new File(temporary, "data").toURI());
storageService.start();
backupManager = new BackupManager(Optional.of(backupStore), storageService, new LocalOrcDataEnvironment(), 5);
}
Aggregations