use of io.trino.plugin.raptor.legacy.storage.FileStorageService in project trino by trinodb.
the class TestShardCleaner method setup.
@BeforeMethod
public void setup() throws IOException {
dbi = createTestingJdbi();
dummyHandle = dbi.open();
createTablesWithRetry(dbi);
temporary = createTempDirectory(null);
File directory = temporary.resolve("data").toFile();
storageService = new FileStorageService(directory);
storageService.start();
File backupDirectory = temporary.resolve("backup").toFile();
backupStore = new FileBackupStore(backupDirectory);
((FileBackupStore) backupStore).start();
ticker = new TestingTicker();
ShardCleanerConfig config = new ShardCleanerConfig();
cleaner = new ShardCleaner(new DaoSupplier<>(dbi, H2ShardDao.class), "node1", true, ticker, storageService, Optional.of(backupStore), config.getMaxTransactionAge(), config.getTransactionCleanerInterval(), config.getLocalCleanerInterval(), config.getLocalCleanTime(), config.getBackupCleanerInterval(), config.getBackupCleanTime(), config.getBackupDeletionThreads(), config.getMaxCompletedTransactionAge());
}
use of io.trino.plugin.raptor.legacy.storage.FileStorageService in project trino by trinodb.
the class TestBackupManager method setup.
@BeforeMethod
public void setup() throws IOException {
temporary = createTempDirectory(null);
FileBackupStore fileStore = new FileBackupStore(temporary.resolve("backup").toFile());
fileStore.start();
backupStore = new TestingBackupStore(fileStore);
storageService = new FileStorageService(temporary.resolve("data").toFile());
storageService.start();
backupManager = new BackupManager(Optional.of(backupStore), storageService, 5);
}
Aggregations