use of com.facebook.presto.spi.NodeManager in project presto by prestodb.
the class TestRaptorMetadata method setupDatabase.
@BeforeMethod
public void setupDatabase() throws Exception {
TypeRegistry typeRegistry = new TypeRegistry();
dbi = new DBI("jdbc:h2:mem:test" + System.nanoTime());
dbi.registerMapper(new TableColumn.Mapper(typeRegistry));
dbi.registerMapper(new Distribution.Mapper(typeRegistry));
dummyHandle = dbi.open();
createTablesWithRetry(dbi);
RaptorConnectorId connectorId = new RaptorConnectorId("raptor");
NodeManager nodeManager = new TestingNodeManager();
NodeSupplier nodeSupplier = nodeManager::getWorkerNodes;
shardManager = createShardManager(dbi, nodeSupplier, systemTicker());
metadata = new RaptorMetadata(connectorId.toString(), dbi, shardManager);
}
Aggregations