Search in sources :

Example 1 with MemoryTableManager

use of io.prestosql.plugin.memory.data.MemoryTableManager in project hetu-core by openlookeng.

the class TestMemoryTableManager method setUp.

@BeforeMethod
public void setUp() throws IOException {
    synchronized (MemoryThreadManager.class) {
        if (!MemoryThreadManager.isSharedThreadPoolInitilized()) {
            MemoryThreadManager.initSharedThreadPool(4);
        }
    }
    pagesStore = new MemoryTableManager(new MemoryConfig().setMaxDataPerNode(new DataSize(1, DataSize.Unit.MEGABYTE)).setSpillRoot(Files.createTempDirectory("test-memory-table").toString()), sorter, new TestingTypeManager(), new TestingPagesSerdeFactory().createPagesSerde());
    pageSinkProvider = new MemoryPageSinkProvider(pagesStore, HostAddress.fromString("localhost:8080"));
}
Also used : TestingPagesSerdeFactory(io.prestosql.testing.TestingPagesSerdeFactory) DataSize(io.airlift.units.DataSize) MemoryTableManager(io.prestosql.plugin.memory.data.MemoryTableManager) TestingTypeManager(io.prestosql.spi.type.testing.TestingTypeManager) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

DataSize (io.airlift.units.DataSize)1 MemoryTableManager (io.prestosql.plugin.memory.data.MemoryTableManager)1 TestingTypeManager (io.prestosql.spi.type.testing.TestingTypeManager)1 TestingPagesSerdeFactory (io.prestosql.testing.TestingPagesSerdeFactory)1 BeforeMethod (org.testng.annotations.BeforeMethod)1