diff --git a/Cargo.lock b/Cargo.lock index e7aaa0e06a7de..18733e461fc82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9575,8 +9575,6 @@ dependencies = [ "glob", "google-cloud-pubsub", "http 0.2.9", - "hyper 0.14.27", - "hyper-tls 0.5.0", "icelake", "indexmap 1.9.3", "itertools 0.12.1", diff --git a/src/connector/Cargo.toml b/src/connector/Cargo.toml index 87a55f020ab36..d3aa8c78750c2 100644 --- a/src/connector/Cargo.toml +++ b/src/connector/Cargo.toml @@ -60,13 +60,6 @@ gcp-bigquery-client = "0.18.0" glob = "0.3" google-cloud-pubsub = "0.23" http = "0.2" -hyper = { version = "0.14", features = [ - "client", - "tcp", - "http1", - "http2", -] } # required by clickhouse client -hyper-tls = "0.5" icelake = { workspace = true } indexmap = { version = "1.9.3", features = ["serde"] } itertools = "0.12" diff --git a/src/connector/src/sink/clickhouse.rs b/src/connector/src/sink/clickhouse.rs index 16407a8f68c6c..72d9edceda9cd 100644 --- a/src/connector/src/sink/clickhouse.rs +++ b/src/connector/src/sink/clickhouse.rs @@ -11,9 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + use core::fmt::Debug; use std::collections::{HashMap, HashSet}; -use std::time::Duration; use anyhow::anyhow; use clickhouse::insert::Insert; @@ -190,18 +190,9 @@ impl ClickHouseEngine { } } -const POOL_IDLE_TIMEOUT: Duration = Duration::from_secs(5); - impl ClickHouseCommon { pub(crate) fn build_client(&self) -> ConnectorResult { - use hyper_tls::HttpsConnector; - - let https = HttpsConnector::new(); - let client = hyper::Client::builder() - .pool_idle_timeout(POOL_IDLE_TIMEOUT) - .build::<_, hyper::Body>(https); - - let client = ClickHouseClient::with_http_client(client) + let client = ClickHouseClient::default() // hyper(0.14) client inside .with_url(&self.url) .with_user(&self.user) .with_password(&self.password)