Search in sources :

Example 1 with BackupStore

use of io.trino.plugin.raptor.legacy.backup.BackupStore in project trino by trinodb.

the class TestRaptorStorageManager method createRaptorStorageManager.

public static RaptorStorageManager createRaptorStorageManager(Jdbi dbi, File temporary, int maxShardRows) {
    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 createRaptorStorageManager(storageService, backupStore, recoveryManager, new InMemoryShardRecorder(), maxShardRows, MAX_FILE_SIZE);
}
Also used : FileBackupStore(io.trino.plugin.raptor.legacy.backup.FileBackupStore) BackupStore(io.trino.plugin.raptor.legacy.backup.BackupStore) FileBackupStore(io.trino.plugin.raptor.legacy.backup.FileBackupStore) TestingNodeManager(io.trino.testing.TestingNodeManager) TestDatabaseShardManager.createShardManager(io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager) ShardManager(io.trino.plugin.raptor.legacy.metadata.ShardManager) FileAssert.assertFile(org.testng.FileAssert.assertFile) File(java.io.File)

Aggregations

BackupStore (io.trino.plugin.raptor.legacy.backup.BackupStore)1 FileBackupStore (io.trino.plugin.raptor.legacy.backup.FileBackupStore)1 ShardManager (io.trino.plugin.raptor.legacy.metadata.ShardManager)1 TestDatabaseShardManager.createShardManager (io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager)1 TestingNodeManager (io.trino.testing.TestingNodeManager)1 File (java.io.File)1 FileAssert.assertFile (org.testng.FileAssert.assertFile)1