use of com.facebook.presto.raptor.storage.StorageManagerConfig in project presto by prestodb.
the class RaptorQueryRunner method createSession.
public static Session createSession(String schema) {
SessionPropertyManager sessionPropertyManager = new SessionPropertyManager();
sessionPropertyManager.addConnectorSessionProperties(new ConnectorId("raptor"), new RaptorSessionProperties(new StorageManagerConfig()).getSessionProperties());
return testSessionBuilder(sessionPropertyManager).setCatalog("raptor").setSchema(schema).setSystemProperty("processing_optimization", "columnar_dictionary").setSystemProperty("dictionary_aggregation", "true").build();
}
use of com.facebook.presto.raptor.storage.StorageManagerConfig in project presto by prestodb.
the class TestRaptorConnector method setup.
@BeforeMethod
public void setup() throws Exception {
TypeRegistry typeRegistry = new TypeRegistry();
DBI dbi = new DBI("jdbc:h2:mem:test" + System.nanoTime());
dbi.registerMapper(new TableColumn.Mapper(typeRegistry));
dummyHandle = dbi.open();
metadataDao = dbi.onDemand(MetadataDao.class);
createTablesWithRetry(dbi);
dataDir = Files.createTempDir();
RaptorConnectorId connectorId = new RaptorConnectorId("test");
NodeManager nodeManager = new TestingNodeManager();
NodeSupplier nodeSupplier = nodeManager::getWorkerNodes;
ShardManager shardManager = createShardManager(dbi);
StorageManager storageManager = createOrcStorageManager(dbi, dataDir);
StorageManagerConfig config = new StorageManagerConfig().setDataDirectory(dataDir);
connector = new RaptorConnector(new LifeCycleManager(ImmutableList.of(), null), new TestingNodeManager(), new RaptorMetadataFactory(connectorId, dbi, shardManager), new RaptorSplitManager(connectorId, nodeSupplier, shardManager, false), new RaptorPageSourceProvider(storageManager), new RaptorPageSinkProvider(storageManager, new PagesIndexPageSorter(new PagesIndex.TestingFactory()), config), new RaptorNodePartitioningProvider(nodeSupplier), new RaptorSessionProperties(config), new RaptorTableProperties(typeRegistry), ImmutableSet.of(), dbi);
}
Aggregations