From dfe7ca67c1269bc38c0ddae133a8a7b067450d49 Mon Sep 17 00:00:00 2001 From: Dmitry Bugakov Date: Sat, 26 Aug 2023 03:36:11 +0200 Subject: [PATCH] [CLEANUP]: Update clickhouse libs & actualise benchmarks (#443) --- .../clickhouse-integration-spark/pom.xml | 4 +-- clickhouse-native-jdbc/pom.xml | 4 +-- .../github/housepower/jdbc/AbstractITest.java | 17 +++++------ .../BalancedClickhouseDataSourceITest.java | 12 ++++---- .../jdbc/benchmark/AbstractIBenchmark.java | 22 +++++++++----- ...eIBenchmark.java => DoubleIBenchmark.java} | 29 ++++++++++--------- .../jdbc/benchmark/InsertIBenchmark.java | 4 +-- ...yIntIBenchmark.java => IntIBenchmark.java} | 29 ++++++++++--------- .../jdbc/benchmark/SelectIBenchmark.java | 4 +-- ...gIBenchmark.java => StringIBenchmark.java} | 29 ++++++++++--------- .../WideColumnDoubleInsertIBenchmark.java | 4 +-- .../WideColumnIntInsertIBenchmark.java | 4 +-- .../WideColumnStringInsertIBenchmark.java | 4 +-- examples/pom.xml | 4 +-- pom.xml | 9 +++--- 15 files changed, 94 insertions(+), 85 deletions(-) rename clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/{RowBinaryDoubleIBenchmark.java => DoubleIBenchmark.java} (70%) rename clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/{RowBinaryIntIBenchmark.java => IntIBenchmark.java} (70%) rename clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/{RowBinaryStringIBenchmark.java => StringIBenchmark.java} (70%) diff --git a/clickhouse-integration/clickhouse-integration-spark/pom.xml b/clickhouse-integration/clickhouse-integration-spark/pom.xml index 14db9d1a..df56a564 100644 --- a/clickhouse-integration/clickhouse-integration-spark/pom.xml +++ b/clickhouse-integration/clickhouse-integration-spark/pom.xml @@ -61,9 +61,9 @@ test - ru.yandex.clickhouse + com.clickhouse clickhouse-jdbc - shaded + all test diff --git a/clickhouse-native-jdbc/pom.xml b/clickhouse-native-jdbc/pom.xml index 7661a438..1c269a76 100644 --- a/clickhouse-native-jdbc/pom.xml +++ b/clickhouse-native-jdbc/pom.xml @@ -57,9 +57,9 @@ test - ru.yandex.clickhouse + com.clickhouse clickhouse-jdbc - shaded + all test diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/AbstractITest.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/AbstractITest.java index 2ab78a45..7175d06b 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/AbstractITest.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/AbstractITest.java @@ -17,7 +17,7 @@ import com.github.housepower.misc.StrUtil; import com.github.housepower.misc.SystemUtil; import org.junit.jupiter.api.BeforeAll; -import org.testcontainers.containers.ClickHouseContainer; +import org.testcontainers.clickhouse.ClickHouseContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.utility.MountableFile; @@ -35,33 +35,32 @@ public abstract class AbstractITest implements Serializable { protected static final ZoneId SERVER_TZ = ZoneId.of("UTC"); protected static final String DRIVER_CLASS_NAME = "com.github.housepower.jdbc.ClickHouseDriver"; - public static final String CLICKHOUSE_IMAGE = System.getProperty("CLICKHOUSE_IMAGE", "yandex/clickhouse-server:21.9"); + public static final String CLICKHOUSE_IMAGE = System.getProperty("CLICKHOUSE_IMAGE", "clickhouse/clickhouse-server:21.9"); protected static final String CLICKHOUSE_USER = SystemUtil.loadProp("CLICKHOUSE_USER", "default"); protected static final String CLICKHOUSE_PASSWORD = SystemUtil.loadProp("CLICKHOUSE_PASSWORD", ""); protected static final String CLICKHOUSE_DB = SystemUtil.loadProp("CLICKHOUSE_DB", ""); protected static final int CLICKHOUSE_GRPC_PORT = 9100; + protected static final int CLICKHOUSE_HTTP_PORT = 8123; + protected static final int CLICKHOUSE_NATIVE_PORT = 9000; @Container - public static ClickHouseContainer container = (ClickHouseContainer) new ClickHouseContainer(CLICKHOUSE_IMAGE) + public static ClickHouseContainer container = new ClickHouseContainer(CLICKHOUSE_IMAGE) .withEnv("CLICKHOUSE_USER", CLICKHOUSE_USER) .withEnv("CLICKHOUSE_PASSWORD", CLICKHOUSE_PASSWORD) .withEnv("CLICKHOUSE_DB", CLICKHOUSE_DB) - .withExposedPorts(CLICKHOUSE_GRPC_PORT) + .withExposedPorts(CLICKHOUSE_HTTP_PORT, CLICKHOUSE_NATIVE_PORT, CLICKHOUSE_GRPC_PORT) .withCopyFileToContainer(MountableFile.forClasspathResource("grpc_config.xml"), "/etc/clickhouse-server/config.d/grpc_config.xml"); - protected static String CK_HOST; - protected static String CK_IP; protected static int CK_PORT; protected static int CK_GRPC_PORT; @BeforeAll public static void extractContainerInfo() { CK_HOST = container.getHost(); - CK_IP = container.getContainerIpAddress(); - CK_PORT = container.getMappedPort(ClickHouseContainer.NATIVE_PORT); + CK_PORT = container.getMappedPort(CLICKHOUSE_NATIVE_PORT); CK_GRPC_PORT = container.getMappedPort(CLICKHOUSE_GRPC_PORT); } @@ -74,7 +73,7 @@ protected String getJdbcUrl() { protected String getJdbcUrl(Object... params) { StringBuilder sb = new StringBuilder(); - int port = container.getMappedPort(ClickHouseContainer.NATIVE_PORT); + int port = container.getMappedPort(CLICKHOUSE_NATIVE_PORT); sb.append("jdbc:clickhouse://").append(container.getHost()).append(":").append(port); if (StrUtil.isNotEmpty(CLICKHOUSE_DB)) { sb.append("/").append(container.getDatabaseName()); diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/BalancedClickhouseDataSourceITest.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/BalancedClickhouseDataSourceITest.java index ad20a960..a5647b91 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/BalancedClickhouseDataSourceITest.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/BalancedClickhouseDataSourceITest.java @@ -34,7 +34,7 @@ public class BalancedClickhouseDataSourceITest extends AbstractITest { @BeforeEach public void reset() { singleDs = new BalancedClickhouseDataSource(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s", CK_HOST, CK_PORT)); - dualDs = new BalancedClickhouseDataSource(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s", CK_HOST, CK_PORT, CK_IP, CK_PORT)); + dualDs = new BalancedClickhouseDataSource(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s", CK_HOST, CK_PORT, CK_HOST, CK_PORT)); } @Test @@ -121,7 +121,7 @@ public void testDisableConnection() { @Test public void testWorkWithEnabledUrl() throws Exception { BalancedClickhouseDataSource halfDatasource = new BalancedClickhouseDataSource( - String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s", "not.existed.url", CK_PORT, CK_IP, CK_PORT), new Properties()); + String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s", "not.existed.url", CK_PORT, CK_HOST, CK_PORT), new Properties()); halfDatasource.actualize(); @@ -173,7 +173,7 @@ public void testConstructWithProperties() { // without connection parameters BalancedClickhouseDataSource dataSource = new BalancedClickhouseDataSource( - String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s/click", CK_HOST, CK_PORT, CK_IP, CK_PORT), properties); + String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s/click", CK_HOST, CK_PORT, CK_HOST, CK_PORT), properties); ClickHouseConfig cfg = dataSource.getCfg(); assertEquals(Duration.ofSeconds(6789), cfg.queryTimeout()); assertEquals("888888", cfg.password()); @@ -181,12 +181,12 @@ public void testConstructWithProperties() { assertEquals(2, dataSource.getAllClickhouseUrls().size()); assertEquals(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s/click", CK_HOST, CK_PORT), dataSource.getAllClickhouseUrls().get(0)); - assertEquals(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s/click", CK_IP, CK_PORT), + assertEquals(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s/click", CK_HOST, CK_PORT), dataSource.getAllClickhouseUrls().get(1)); // with connection parameters dataSource = new BalancedClickhouseDataSource( - String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s/click?query_timeout=12345&user=readonly", CK_HOST, CK_PORT, CK_IP, CK_PORT), properties); + String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s,%s:%s/click?query_timeout=12345&user=readonly", CK_HOST, CK_PORT, CK_HOST, CK_PORT), properties); cfg = dataSource.getCfg(); assertEquals(Duration.ofSeconds(6789), cfg.queryTimeout()); assertEquals("readonly", cfg.user()); @@ -195,7 +195,7 @@ public void testConstructWithProperties() { assertEquals(2, dataSource.getAllClickhouseUrls().size()); assertEquals(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s/click?query_timeout=12345&user=readonly", CK_HOST, CK_PORT), dataSource.getAllClickhouseUrls().get(0)); - assertEquals(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s/click?query_timeout=12345&user=readonly", CK_IP, CK_PORT), + assertEquals(String.format(Locale.ROOT, "jdbc:clickhouse://%s:%s/click?query_timeout=12345&user=readonly", CK_HOST, CK_PORT), dataSource.getAllClickhouseUrls().get(1)); } } diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/AbstractIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/AbstractIBenchmark.java index 0a3389a8..bd010c06 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/AbstractIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/AbstractIBenchmark.java @@ -20,7 +20,7 @@ import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; -import org.testcontainers.containers.ClickHouseContainer; +import org.testcontainers.clickhouse.ClickHouseContainer; import java.sql.*; import java.util.Enumeration; @@ -31,6 +31,12 @@ @State(Scope.Thread) public class AbstractIBenchmark { + /* + * HTTP API Port for http requests. used by JDBC, ODBC and web interfaces. + * */ + protected static final int CLICKHOUSE_HTTP_PORT = 8123; + protected static final int CLICKHOUSE_NATIVE_PORT = 9000; + public static final ClickHouseContainer container; static { @@ -38,7 +44,7 @@ public class AbstractIBenchmark { container.start(); } - private final Driver httpDriver = new ru.yandex.clickhouse.ClickHouseDriver(); + private final Driver clickhouseJdbcDriver = new com.clickhouse.jdbc.ClickHouseDriver(); private final Driver nativeDriver = new com.github.housepower.jdbc.ClickHouseDriver(); public static void main(String[] args) throws RunnerException { @@ -64,13 +70,13 @@ protected void withConnection(WithConnection withConnection, ConnectionType conn case NATIVE: Class.forName("com.github.housepower.jdbc.ClickHouseDriver"); DriverManager.registerDriver(nativeDriver); - port = container.getMappedPort(ClickHouseContainer.NATIVE_PORT); + port = container.getMappedPort(CLICKHOUSE_NATIVE_PORT); break; - case HTTP: - Class.forName("ru.yandex.clickhouse.ClickHouseDriver"); - DriverManager.registerDriver(httpDriver); - port = container.getMappedPort(ClickHouseContainer.HTTP_PORT); + case JDBC: + Class.forName("com.clickhouse.jdbc.ClickHouseDriver"); + DriverManager.registerDriver(clickhouseJdbcDriver); + port = container.getMappedPort(CLICKHOUSE_HTTP_PORT); break; default: @@ -111,6 +117,6 @@ public interface WithPreparedStatement { } public enum ConnectionType { - NATIVE, HTTP + NATIVE, JDBC } } diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryDoubleIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/DoubleIBenchmark.java similarity index 70% rename from clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryDoubleIBenchmark.java rename to clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/DoubleIBenchmark.java index c3fffc39..daf29cd6 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryDoubleIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/DoubleIBenchmark.java @@ -16,12 +16,10 @@ import com.google.common.base.Strings; import org.openjdk.jmh.annotations.Benchmark; -import ru.yandex.clickhouse.ClickHouseStatement; -import ru.yandex.clickhouse.domain.ClickHouseFormat; import static org.junit.jupiter.api.Assertions.assertEquals; -public class RowBinaryDoubleIBenchmark extends AbstractInsertIBenchmark { +public class DoubleIBenchmark extends AbstractInsertIBenchmark { private final String columnType = "Float64"; @Benchmark @@ -46,20 +44,23 @@ public void benchInsertNative() throws Exception { } @Benchmark - public void benchInsertHttpRowBinary() throws Exception { + public void benchInsertJdbc() throws Exception { withConnection(connection -> { wideColumnPrepare(connection, columnType); - withStatement(connection, stmt -> { - ClickHouseStatement sth = (ClickHouseStatement) stmt; - sth.write().send("INSERT INTO " + getTableName(), stream -> { - for (int i = 0; i < batchSize; i++) { - for (int j = 0; j < columnNum; j++) { - stream.writeFloat64(j + 1.0); + String params = Strings.repeat("?, ", columnNum); + withPreparedStatement(connection, + "INSERT INTO " + getTableName() + " values(" + params.substring(0, params.length() - 2) + ")", + pstmt -> { + for (int i = 0; i < batchSize; i++) { + for (int j = 0; j < columnNum; j++) { + pstmt.setDouble(j + 1, j + 1.0); + } + pstmt.addBatch(); } - } - }, ClickHouseFormat.RowBinary); - }); + int[] res = pstmt.executeBatch(); + assertEquals(res.length, batchSize); + }); wideColumnAfter(connection); - }, ConnectionType.HTTP); + }, ConnectionType.JDBC); } } diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/InsertIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/InsertIBenchmark.java index 0a71d431..6abc8658 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/InsertIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/InsertIBenchmark.java @@ -61,7 +61,7 @@ public void benchInsertNative() throws Exception { } @Benchmark - public void benchInsertHttp() throws Exception { - withConnection(benchInsert, ConnectionType.HTTP); + public void benchInsertJdbc() throws Exception { + withConnection(benchInsert, ConnectionType.JDBC); } } diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryIntIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/IntIBenchmark.java similarity index 70% rename from clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryIntIBenchmark.java rename to clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/IntIBenchmark.java index fea18770..62978a19 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryIntIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/IntIBenchmark.java @@ -16,12 +16,10 @@ import com.google.common.base.Strings; import org.openjdk.jmh.annotations.Benchmark; -import ru.yandex.clickhouse.ClickHouseStatement; -import ru.yandex.clickhouse.domain.ClickHouseFormat; import static org.junit.jupiter.api.Assertions.assertEquals; -public class RowBinaryIntIBenchmark extends AbstractInsertIBenchmark { +public class IntIBenchmark extends AbstractInsertIBenchmark { private final String columnType = "Int32"; @Benchmark @@ -46,21 +44,24 @@ public void benchInsertNative() throws Exception { } @Benchmark - public void benchInsertHttpRowBinary() throws Exception { + public void benchInsertJdbc() throws Exception { withConnection(connection -> { wideColumnPrepare(connection, columnType); - withStatement(connection, stmt -> { - ClickHouseStatement sth = (ClickHouseStatement) stmt; - sth.write().send("INSERT INTO " + getTableName(), stream -> { - for (int i = 0; i < batchSize; i++) { - for (int j = 0; j < columnNum; j++) { - stream.writeInt32(j + 1); + String params = Strings.repeat("?, ", columnNum); + withPreparedStatement(connection, + "INSERT INTO " + getTableName() + " values(" + params.substring(0, params.length() - 2) + ")", + pstmt -> { + for (int i = 0; i < batchSize; i++) { + for (int j = 0; j < columnNum; j++) { + pstmt.setObject(j + 1, j + 1); + } + pstmt.addBatch(); } - } - }, ClickHouseFormat.RowBinary); - }); + int[] res = pstmt.executeBatch(); + assertEquals(res.length, batchSize); + }); wideColumnAfter(connection); - }, ConnectionType.HTTP); + }, ConnectionType.JDBC); } } diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/SelectIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/SelectIBenchmark.java index 7630443c..41360bac 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/SelectIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/SelectIBenchmark.java @@ -47,7 +47,7 @@ public void benchSelectNative() throws Exception { } @Benchmark - public void benchSelectHTTP() throws Exception { - withConnection(benchSelect, ConnectionType.HTTP); + public void benchSelectJdbc() throws Exception { + withConnection(benchSelect, ConnectionType.JDBC); } } diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryStringIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/StringIBenchmark.java similarity index 70% rename from clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryStringIBenchmark.java rename to clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/StringIBenchmark.java index 997991c7..fa1e5f1a 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/RowBinaryStringIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/StringIBenchmark.java @@ -16,12 +16,10 @@ import com.google.common.base.Strings; import org.openjdk.jmh.annotations.Benchmark; -import ru.yandex.clickhouse.ClickHouseStatement; -import ru.yandex.clickhouse.domain.ClickHouseFormat; import static org.junit.jupiter.api.Assertions.assertEquals; -public class RowBinaryStringIBenchmark extends AbstractInsertIBenchmark { +public class StringIBenchmark extends AbstractInsertIBenchmark { private final String columnType = "String"; @Benchmark @@ -46,21 +44,24 @@ public void benchInsertNative() throws Exception { } @Benchmark - public void benchInsertHttpRowBinary() throws Exception { + public void benchInsertJdbc() throws Exception { withConnection(connection -> { wideColumnPrepare(connection, columnType); - withStatement(connection, stmt -> { - ClickHouseStatement sth = (ClickHouseStatement) stmt; - sth.write().send("INSERT INTO " + getTableName(), stream -> { - for (int i = 0; i < batchSize; i++) { - for (int j = 0; j < columnNum; j++) { - stream.writeString(j + 1 + ""); + String params = Strings.repeat("?, ", columnNum); + withPreparedStatement(connection, + "INSERT INTO " + getTableName() + " values(" + params.substring(0, params.length() - 2) + ")", + pstmt -> { + for (int i = 0; i < batchSize; i++) { + for (int j = 0; j < columnNum; j++) { + pstmt.setObject(j + 1, j + 1 + ""); + } + pstmt.addBatch(); } - } - }, ClickHouseFormat.RowBinary); - }); + int[] res = pstmt.executeBatch(); + assertEquals(res.length, batchSize); + }); wideColumnAfter(connection); - }, ConnectionType.HTTP); + }, ConnectionType.JDBC); } } diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnDoubleInsertIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnDoubleInsertIBenchmark.java index 70ee0157..59e31ddf 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnDoubleInsertIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnDoubleInsertIBenchmark.java @@ -27,8 +27,8 @@ public void benchInsertNative() throws Exception { } @Benchmark - public void benchInsertHttp() throws Exception { - withConnection(benchInsert, ConnectionType.HTTP); + public void benchInsertJdbc() throws Exception { + withConnection(benchInsert, ConnectionType.JDBC); } public WithConnection benchInsert = connection -> { diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnIntInsertIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnIntInsertIBenchmark.java index f687af32..4154e3c7 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnIntInsertIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnIntInsertIBenchmark.java @@ -27,8 +27,8 @@ public void benchInsertNative() throws Exception { } @Benchmark - public void benchInsertHttp() throws Exception { - withConnection(benchInsert, ConnectionType.HTTP); + public void benchInsertJdbc() throws Exception { + withConnection(benchInsert, ConnectionType.JDBC); } public WithConnection benchInsert = connection -> { diff --git a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnStringInsertIBenchmark.java b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnStringInsertIBenchmark.java index 89f89e5a..4eb4055b 100644 --- a/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnStringInsertIBenchmark.java +++ b/clickhouse-native-jdbc/src/test/java/com/github/housepower/jdbc/benchmark/WideColumnStringInsertIBenchmark.java @@ -27,8 +27,8 @@ public void benchInsertNative() throws Exception { } @Benchmark - public void benchInsertHttp() throws Exception { - withConnection(benchInsert, ConnectionType.HTTP); + public void benchInsertJdbc() throws Exception { + withConnection(benchInsert, ConnectionType.JDBC); } public WithConnection benchInsert = connection -> { diff --git a/examples/pom.xml b/examples/pom.xml index 31d4d02d..7a68dd6b 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -45,9 +45,9 @@ test - ru.yandex.clickhouse + com.clickhouse clickhouse-jdbc - shaded + all test diff --git a/pom.xml b/pom.xml index 9e2a549c..70f7bf9b 100644 --- a/pom.xml +++ b/pom.xml @@ -115,7 +115,7 @@ 1.2.4 2.8.0 5.7.0 - 1.15.1 + 1.19.0 /tmp/async-profiler-1.8.3-linux-x64/build @@ -188,10 +188,11 @@ ${jmh.version} - ru.yandex.clickhouse + com.clickhouse clickhouse-jdbc - shaded - ${yandex-clickhouse-jdbc.version} + 0.4.6 + + all com.fasterxml.jackson.core