Search in sources :

Example 1 with BackupStore

use of com.facebook.presto.raptor.backup.BackupStore in project presto by prestodb.

the class TestOrcStorageManager method createOrcStorageManager.

public static OrcStorageManager createOrcStorageManager(IDBI dbi, File temporary, int maxShardRows) throws IOException {
    File directory = new File(temporary, "data");
    StorageService storageService = new FileStorageService(directory);
    storageService.start();
    File backupDirectory = new File(temporary, "backup");
    FileBackupStore fileBackupStore = new FileBackupStore(backupDirectory);
    fileBackupStore.start();
    Optional<BackupStore> backupStore = Optional.of(fileBackupStore);
    ShardManager shardManager = createShardManager(dbi);
    ShardRecoveryManager recoveryManager = new ShardRecoveryManager(storageService, backupStore, new TestingNodeManager(), shardManager, MISSING_SHARD_DISCOVERY, 10);
    return createOrcStorageManager(storageService, backupStore, recoveryManager, new InMemoryShardRecorder(), maxShardRows, MAX_FILE_SIZE);
}
Also used : FileBackupStore(com.facebook.presto.raptor.backup.FileBackupStore) FileBackupStore(com.facebook.presto.raptor.backup.FileBackupStore) BackupStore(com.facebook.presto.raptor.backup.BackupStore) TestingNodeManager(com.facebook.presto.testing.TestingNodeManager) ShardManager(com.facebook.presto.raptor.metadata.ShardManager) TestDatabaseShardManager.createShardManager(com.facebook.presto.raptor.metadata.TestDatabaseShardManager.createShardManager) FileAssert.assertFile(org.testng.FileAssert.assertFile) File(java.io.File)

Aggregations

BackupStore (com.facebook.presto.raptor.backup.BackupStore)1 FileBackupStore (com.facebook.presto.raptor.backup.FileBackupStore)1 ShardManager (com.facebook.presto.raptor.metadata.ShardManager)1 TestDatabaseShardManager.createShardManager (com.facebook.presto.raptor.metadata.TestDatabaseShardManager.createShardManager)1 TestingNodeManager (com.facebook.presto.testing.TestingNodeManager)1 File (java.io.File)1 FileAssert.assertFile (org.testng.FileAssert.assertFile)1