Search in sources :

Example 1 with MemoryPlugin

use of io.trino.plugin.memory.MemoryPlugin in project trino by trinodb.

the class TestJdbcPreparedStatement method setup.

@BeforeClass
public void setup() throws Exception {
    Logging.initialize();
    server = TestingTrinoServer.builder().setProperties(ImmutableMap.<String, String>builder().put("http-server.max-request-header-size", format("%sB", HEADER_SIZE_LIMIT)).put("http-server.max-response-header-size", format("%sB", HEADER_SIZE_LIMIT)).buildOrThrow()).build();
    server.installPlugin(new BlackHolePlugin());
    server.installPlugin(new MemoryPlugin());
    server.createCatalog("blackhole", "blackhole");
    server.createCatalog("memory", "memory");
    server.waitForNodeRefresh(Duration.ofSeconds(10));
    try (Connection connection = createConnection();
        Statement statement = connection.createStatement()) {
        statement.executeUpdate("CREATE SCHEMA blackhole.blackhole");
    }
}
Also used : BlackHolePlugin(io.trino.plugin.blackhole.BlackHolePlugin) PreparedStatement(java.sql.PreparedStatement) Statement(java.sql.Statement) Connection(java.sql.Connection) MemoryPlugin(io.trino.plugin.memory.MemoryPlugin) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with MemoryPlugin

use of io.trino.plugin.memory.MemoryPlugin in project trino by trinodb.

the class TestCoordinatorDynamicFiltering method setup.

@BeforeClass
public void setup() {
    // create lineitem table in test connector
    getQueryRunner().installPlugin(new TestPlugin());
    getQueryRunner().installPlugin(new TpchPlugin());
    getQueryRunner().installPlugin(new TpcdsPlugin());
    getQueryRunner().installPlugin(new MemoryPlugin());
    getQueryRunner().createCatalog("test", "test", ImmutableMap.of());
    getQueryRunner().createCatalog("tpch", "tpch", ImmutableMap.of());
    getQueryRunner().createCatalog("tpcds", "tpcds", ImmutableMap.of());
    getQueryRunner().createCatalog("memory", "memory", ImmutableMap.of());
    computeActual("CREATE TABLE lineitem AS SELECT * FROM tpch.tiny.lineitem");
    computeActual("CREATE TABLE customer AS SELECT * FROM tpch.tiny.customer");
    computeActual("CREATE TABLE store_sales AS SELECT * FROM tpcds.tiny.store_sales");
}
Also used : TpchPlugin(io.trino.plugin.tpch.TpchPlugin) TpcdsPlugin(io.trino.plugin.tpcds.TpcdsPlugin) MemoryPlugin(io.trino.plugin.memory.MemoryPlugin) BeforeClass(org.testng.annotations.BeforeClass)

Example 3 with MemoryPlugin

use of io.trino.plugin.memory.MemoryPlugin in project trino by trinodb.

the class TestServer method setup.

@BeforeClass
public void setup() {
    server = TestingTrinoServer.builder().setProperties(ImmutableMap.<String, String>builder().put("http-server.process-forwarded", "true").buildOrThrow()).build();
    server.installPlugin(new MemoryPlugin());
    server.createCatalog("memory", "memory");
    client = new JettyHttpClient();
}
Also used : JettyHttpClient(io.airlift.http.client.jetty.JettyHttpClient) MemoryPlugin(io.trino.plugin.memory.MemoryPlugin) BeforeClass(org.testng.annotations.BeforeClass)

Example 4 with MemoryPlugin

use of io.trino.plugin.memory.MemoryPlugin in project trino by trinodb.

the class TestTpchTableScanRedirection method createQueryRunner.

@Override
protected QueryRunner createQueryRunner() throws Exception {
    DistributedQueryRunner queryRunner = TpchQueryRunnerBuilder.builder().withTableScanRedirectionCatalog("memory").withTableScanRedirectionSchema("test").build();
    queryRunner.installPlugin(new MemoryPlugin());
    queryRunner.createCatalog("memory", "memory");
    // Add another tpch catalog without redirection to aid in loading data into memory connector
    queryRunner.createCatalog("tpch_data_load", "tpch");
    queryRunner.execute("CREATE SCHEMA memory.test");
    return queryRunner;
}
Also used : DistributedQueryRunner(io.trino.testing.DistributedQueryRunner) MemoryPlugin(io.trino.plugin.memory.MemoryPlugin)

Aggregations

MemoryPlugin (io.trino.plugin.memory.MemoryPlugin)4 BeforeClass (org.testng.annotations.BeforeClass)3 JettyHttpClient (io.airlift.http.client.jetty.JettyHttpClient)1 BlackHolePlugin (io.trino.plugin.blackhole.BlackHolePlugin)1 TpcdsPlugin (io.trino.plugin.tpcds.TpcdsPlugin)1 TpchPlugin (io.trino.plugin.tpch.TpchPlugin)1 DistributedQueryRunner (io.trino.testing.DistributedQueryRunner)1 Connection (java.sql.Connection)1 PreparedStatement (java.sql.PreparedStatement)1 Statement (java.sql.Statement)1