Java Code Examples for ru.yandex.clickhouse.settings.ClickHouseProperties#setDecompress()

The following examples show how to use ru.yandex.clickhouse.settings.ClickHouseProperties#setDecompress() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WriterTest.java    From clickhouse-jdbc with Apache License 2.0 5 votes vote down vote up
@BeforeMethod
public void setUp() throws Exception {
    ClickHouseProperties properties = new ClickHouseProperties();
    properties.setDecompress(true);
    properties.setCompress(true);
    connection = new ClickHouseDataSource("jdbc:clickhouse://localhost:8123", properties).getConnection();
    statement = connection.createStatement();
    connection.createStatement().execute("CREATE DATABASE IF NOT EXISTS test");
    connection.createStatement().execute("DROP TABLE IF EXISTS test.writer");
    connection.createStatement().execute("CREATE TABLE test.writer (id Int32, name String) ENGINE = Log");
    connection.createStatement().execute("TRUNCATE TABLE test.writer");
}
 
Example 2
Source File: ClickhouseLZ4StreamTest.java    From clickhouse-jdbc with Apache License 2.0 5 votes vote down vote up
@BeforeTest
public void setUp() throws Exception {
    ClickHouseProperties properties = new ClickHouseProperties();
    properties.setDecompress(true);
    dataSource = new ClickHouseDataSource("jdbc:clickhouse://localhost:8123", properties);
    connection = dataSource.getConnection();
    connection.createStatement().execute("CREATE DATABASE IF NOT EXISTS test");
}