Search in sources :

Example 1 with TestingTypeManager

use of io.prestosql.spi.type.testing.TestingTypeManager in project hetu-core by openlookeng.

the class TestParquetPageSourceFactory method setUp.

@BeforeClass
public void setUp() {
    HiveHdfsConfiguration hiveHdfsConfiguration = new HiveHdfsConfiguration(new HdfsConfigurationInitializer(new HiveConfig(), ImmutableSet.of()), ImmutableSet.of());
    HdfsEnvironment hdfsEnvironment = new HdfsEnvironment(hiveHdfsConfiguration, new HiveConfig(), new NoHdfsAuthentication());
    parquetPageSourceFactory = new ParquetPageSourceFactory(new TestingTypeManager(), hdfsEnvironment, new FileFormatDataSourceStats(), new HiveConfig());
}
Also used : HdfsConfigurationInitializer(io.prestosql.plugin.hive.HdfsConfigurationInitializer) HiveHdfsConfiguration(io.prestosql.plugin.hive.HiveHdfsConfiguration) FileFormatDataSourceStats(io.prestosql.plugin.hive.FileFormatDataSourceStats) NoHdfsAuthentication(io.prestosql.plugin.hive.authentication.NoHdfsAuthentication) TestingTypeManager(io.prestosql.spi.type.testing.TestingTypeManager) HiveConfig(io.prestosql.plugin.hive.HiveConfig) HdfsEnvironment(io.prestosql.plugin.hive.HdfsEnvironment) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with TestingTypeManager

use of io.prestosql.spi.type.testing.TestingTypeManager in project hetu-core by openlookeng.

the class TestMemoryMetadata method setUp.

@BeforeMethod
public void setUp() throws IOException {
    TempFolder tmp = new TempFolder().create();
    Runtime.getRuntime().addShutdownHook(new Thread(tmp::close));
    metadata = new MemoryMetadata(new TestingTypeManager(), new TestingNodeManager(), new HetuFsMetastore(new HetuFsMetastoreConfig().setHetuFileSystemMetastorePath(tmp.getRoot().getCanonicalPath()), new HetuLocalFileSystemClient(new LocalConfig(null), Paths.get(tmp.getRoot().getCanonicalPath()))), null, new MemoryConfig());
}
Also used : HetuFsMetastoreConfig(io.hetu.core.metastore.hetufilesystem.HetuFsMetastoreConfig) TempFolder(io.hetu.core.common.filesystem.TempFolder) TestingNodeManager(io.prestosql.testing.TestingNodeManager) LocalConfig(io.hetu.core.filesystem.LocalConfig) HetuFsMetastore(io.hetu.core.metastore.hetufilesystem.HetuFsMetastore) HetuLocalFileSystemClient(io.hetu.core.filesystem.HetuLocalFileSystemClient) TestingTypeManager(io.prestosql.spi.type.testing.TestingTypeManager) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with TestingTypeManager

use of io.prestosql.spi.type.testing.TestingTypeManager 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

TestingTypeManager (io.prestosql.spi.type.testing.TestingTypeManager)3 BeforeMethod (org.testng.annotations.BeforeMethod)2 DataSize (io.airlift.units.DataSize)1 TempFolder (io.hetu.core.common.filesystem.TempFolder)1 HetuLocalFileSystemClient (io.hetu.core.filesystem.HetuLocalFileSystemClient)1 LocalConfig (io.hetu.core.filesystem.LocalConfig)1 HetuFsMetastore (io.hetu.core.metastore.hetufilesystem.HetuFsMetastore)1 HetuFsMetastoreConfig (io.hetu.core.metastore.hetufilesystem.HetuFsMetastoreConfig)1 FileFormatDataSourceStats (io.prestosql.plugin.hive.FileFormatDataSourceStats)1 HdfsConfigurationInitializer (io.prestosql.plugin.hive.HdfsConfigurationInitializer)1 HdfsEnvironment (io.prestosql.plugin.hive.HdfsEnvironment)1 HiveConfig (io.prestosql.plugin.hive.HiveConfig)1 HiveHdfsConfiguration (io.prestosql.plugin.hive.HiveHdfsConfiguration)1 NoHdfsAuthentication (io.prestosql.plugin.hive.authentication.NoHdfsAuthentication)1 MemoryTableManager (io.prestosql.plugin.memory.data.MemoryTableManager)1 TestingNodeManager (io.prestosql.testing.TestingNodeManager)1 TestingPagesSerdeFactory (io.prestosql.testing.TestingPagesSerdeFactory)1 BeforeClass (org.testng.annotations.BeforeClass)1