-
Notifications
You must be signed in to change notification settings - Fork 577
Add apache http client #1146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add apache http client #1146
Conversation
clickhouse-client/src/test/java/com/clickhouse/client/ClientIntegrationTest.java
Outdated
Show resolved
Hide resolved
clickhouse-client/src/main/java/com/clickhouse/client/config/ClickHouseSocketOption.java
Outdated
Show resolved
Hide resolved
Thank you @JackyWoo for the pull request. Just added a few immediate feedback. Apart from that, we also need to update pom to ensure Apache libraries will be only included in -all jar. Will run benchmark tomorrow to understand more. |
The performance does not look good somehow.
|
May I ask how to configure benchmark |
Please pull latest code fron your branch and follow instructions below. cd clickhouse-benchmark
mvn -Drelease clean package
java -jar target/benchmarks.jar -p client=clickhouse-apache-http-client-jdbc -p type=default -p connection=reuse Query.selectInt8 |
Optimize apache http client by reuse connection. Below is benchmark in my local machine. It seems a little better than http url client.
|
@zhicwu Please review the PR, when you have a changce. |
Thank you for the contribution @JackyWoo. I was waiting the build failure got fixed :) The benchmark makes sense as they should be similar, and the result could be slightly different when using single thread vs. multi-thread for the benchmark. Anyway, just document my concerns and may change the code after merging this PR.
Lastly, while I'm working on TCP client, if we need better control of Socket, we probably need non-blocking SocketChannel based implementation as well. |
@zhicwu Thank you, may I know when 0.33 will release? |
This pr will close #1139 .
change log
ClickHouseHttpClientTest
parameterized