Search in sources :

Example 1 with PagesIndexPageSorter

use of io.trino.operator.PagesIndexPageSorter in project trino by trinodb.

the class BenchmarkPagesIndexPageSorter method runBenchmark.

@Benchmark
public int runBenchmark(BenchmarkData data) {
    PageSorter pageSorter = new PagesIndexPageSorter(new PagesIndex.TestingFactory(false));
    long[] addresses = pageSorter.sort(data.types, data.pages, data.sortChannels, nCopies(data.sortChannels.size(), ASC_NULLS_FIRST), 10_000);
    return addresses.length;
}
Also used : PagesIndexPageSorter(io.trino.operator.PagesIndexPageSorter) PagesIndexPageSorter(io.trino.operator.PagesIndexPageSorter) PageSorter(io.trino.spi.PageSorter) PagesIndex(io.trino.operator.PagesIndex) Benchmark(org.openjdk.jmh.annotations.Benchmark)

Example 2 with PagesIndexPageSorter

use of io.trino.operator.PagesIndexPageSorter in project trino by trinodb.

the class TestRaptorConnector method setup.

@BeforeMethod
public void setup() {
    Jdbi dbi = createTestingJdbi();
    dummyHandle = dbi.open();
    metadataDao = dbi.onDemand(MetadataDao.class);
    createTablesWithRetry(dbi);
    dataDir = Files.createTempDir();
    CatalogName connectorId = new CatalogName("test");
    NodeManager nodeManager = new TestingNodeManager();
    NodeSupplier nodeSupplier = nodeManager::getWorkerNodes;
    ShardManager shardManager = createShardManager(dbi);
    StorageManager storageManager = createRaptorStorageManager(dbi, dataDir);
    StorageManagerConfig config = new StorageManagerConfig();
    connector = new RaptorConnector(new LifeCycleManager(ImmutableList.of(), null), new TestingNodeManager(), new RaptorMetadataFactory(dbi, shardManager), new RaptorSplitManager(connectorId, nodeSupplier, shardManager, false), new RaptorPageSourceProvider(storageManager), new RaptorPageSinkProvider(storageManager, new PagesIndexPageSorter(new PagesIndex.TestingFactory(false)), config), new RaptorNodePartitioningProvider(nodeSupplier), new RaptorSessionProperties(config), new RaptorTableProperties(TESTING_TYPE_MANAGER), ImmutableSet.of(), Optional.empty(), dbi);
}
Also used : DatabaseTesting.createTestingJdbi(io.trino.plugin.raptor.legacy.DatabaseTesting.createTestingJdbi) Jdbi(org.jdbi.v3.core.Jdbi) StorageManager(io.trino.plugin.raptor.legacy.storage.StorageManager) TestRaptorStorageManager.createRaptorStorageManager(io.trino.plugin.raptor.legacy.storage.TestRaptorStorageManager.createRaptorStorageManager) TestDatabaseShardManager.createShardManager(io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager) ShardManager(io.trino.plugin.raptor.legacy.metadata.ShardManager) StorageManagerConfig(io.trino.plugin.raptor.legacy.storage.StorageManagerConfig) NodeManager(io.trino.spi.NodeManager) TestingNodeManager(io.trino.testing.TestingNodeManager) PagesIndexPageSorter(io.trino.operator.PagesIndexPageSorter) LifeCycleManager(io.airlift.bootstrap.LifeCycleManager) TestingNodeManager(io.trino.testing.TestingNodeManager) CatalogName(io.trino.plugin.base.CatalogName) MetadataDao(io.trino.plugin.raptor.legacy.metadata.MetadataDao) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

PagesIndexPageSorter (io.trino.operator.PagesIndexPageSorter)2 LifeCycleManager (io.airlift.bootstrap.LifeCycleManager)1 PagesIndex (io.trino.operator.PagesIndex)1 CatalogName (io.trino.plugin.base.CatalogName)1 DatabaseTesting.createTestingJdbi (io.trino.plugin.raptor.legacy.DatabaseTesting.createTestingJdbi)1 MetadataDao (io.trino.plugin.raptor.legacy.metadata.MetadataDao)1 ShardManager (io.trino.plugin.raptor.legacy.metadata.ShardManager)1 TestDatabaseShardManager.createShardManager (io.trino.plugin.raptor.legacy.metadata.TestDatabaseShardManager.createShardManager)1 StorageManager (io.trino.plugin.raptor.legacy.storage.StorageManager)1 StorageManagerConfig (io.trino.plugin.raptor.legacy.storage.StorageManagerConfig)1 TestRaptorStorageManager.createRaptorStorageManager (io.trino.plugin.raptor.legacy.storage.TestRaptorStorageManager.createRaptorStorageManager)1 NodeManager (io.trino.spi.NodeManager)1 PageSorter (io.trino.spi.PageSorter)1 TestingNodeManager (io.trino.testing.TestingNodeManager)1 Jdbi (org.jdbi.v3.core.Jdbi)1 Benchmark (org.openjdk.jmh.annotations.Benchmark)1 BeforeMethod (org.testng.annotations.BeforeMethod)1