Skip to content

Commit d35b624

Browse files
committed
add logging TPCDSClusterSuite & change client buffers
1 parent 1e056f0 commit d35b624

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

clickhouse-core/src/main/scala/com/clickhouse/spark/client/NodeClient.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ class NodeClient(val nodeSpec: NodeSpec) extends AutoCloseable with Logging {
101101
.setClientName(userAgent)
102102
.compressClientRequest(true)
103103
.setConnectionRequestTimeout(30000, ChronoUnit.MILLIS)
104+
.setClientNetworkBufferSize(804800 * 2)
105+
.setSocketRcvbuf(804800 * 2)
104106
.addEndpoint(createClickHouseURL(nodeSpec))
105107
.build()
106108

spark-3.3/clickhouse-spark-it/src/test/scala/org/apache/spark/sql/clickhouse/cluster/TPCDSClusterSuite.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class TPCDSClusterSuite extends SparkClickHouseClusterTest {
3838
spark.sql("CREATE DATABASE tpcds_sf1_cluster WITH DBPROPERTIES (cluster = 'single_replica')")
3939

4040
TPCDSTestUtils.tablePrimaryKeys.foreach { case (table, primaryKeys) =>
41+
println(s"before table ${table} ${primaryKeys}")
42+
val start: Long = System.currentTimeMillis()
4143
spark.sql(
4244
s"""
4345
|CREATE TABLE tpcds_sf1_cluster.$table
@@ -51,6 +53,7 @@ class TPCDSClusterSuite extends SparkClickHouseClusterTest {
5153
|SELECT * FROM tpcds.sf1.$table;
5254
|""".stripMargin
5355
)
56+
println(s"time took table ${table} ${System.currentTimeMillis() - start}")
5457
}
5558

5659
TPCDSTestUtils.tablePrimaryKeys.keys.foreach { table =>

spark-3.4/clickhouse-spark-it/src/test/scala/org/apache/spark/sql/clickhouse/cluster/TPCDSClusterSuite.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class TPCDSClusterSuite extends SparkClickHouseClusterTest {
3838
spark.sql("CREATE DATABASE tpcds_sf1_cluster WITH DBPROPERTIES (cluster = 'single_replica')")
3939

4040
TPCDSTestUtils.tablePrimaryKeys.foreach { case (table, primaryKeys) =>
41+
println(s"before table ${table} ${primaryKeys}")
42+
val start: Long = System.currentTimeMillis()
4143
spark.sql(
4244
s"""
4345
|CREATE TABLE tpcds_sf1_cluster.$table
@@ -51,6 +53,7 @@ class TPCDSClusterSuite extends SparkClickHouseClusterTest {
5153
|SELECT * FROM tpcds.sf1.$table;
5254
|""".stripMargin
5355
)
56+
println(s"time took table ${table} ${System.currentTimeMillis() - start}")
5457
}
5558

5659
TPCDSTestUtils.tablePrimaryKeys.keys.foreach { table =>

spark-3.5/clickhouse-spark-it/src/test/scala/org/apache/spark/sql/clickhouse/cluster/TPCDSClusterSuite.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class TPCDSClusterSuite extends SparkClickHouseClusterTest {
3838
spark.sql("CREATE DATABASE tpcds_sf1_cluster WITH DBPROPERTIES (cluster = 'single_replica')")
3939

4040
TPCDSTestUtils.tablePrimaryKeys.foreach { case (table, primaryKeys) =>
41+
println(s"before table ${table} ${primaryKeys}")
42+
val start: Long = System.currentTimeMillis()
4143
spark.sql(
4244
s"""
4345
|CREATE TABLE tpcds_sf1_cluster.$table
@@ -51,9 +53,11 @@ class TPCDSClusterSuite extends SparkClickHouseClusterTest {
5153
|SELECT * FROM tpcds.sf1.$table;
5254
|""".stripMargin
5355
)
56+
println(s"time took table ${table} ${System.currentTimeMillis() - start}")
5457
}
5558

5659
TPCDSTestUtils.tablePrimaryKeys.keys.foreach { table =>
60+
println(s"table ${table}")
5761
assert(spark.table(s"tpcds.sf1.$table").count === spark.table(s"tpcds_sf1_cluster.$table").count)
5862
}
5963
}

0 commit comments

Comments
 (0)