-
Notifications
You must be signed in to change notification settings - Fork 538
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
[client-v2] Added options for additional headers and server settings #1841
Conversation
Quality Gate failedFailed conditions |
@DataProvider(name = "testPropertyWithValueList_endpoints") | ||
public static Object[][] endpoints() { | ||
return new Object[][] { | ||
{ "http://server1:9090/my_db?custom_settings=param1=value1,param2=value2", 1, new String[]{"http://server1:9090/"} }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a valid URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not exactly URL - it is client endpoints spec. It may have multiple hosts for example.
Current example has custom setting with multiple key-value pairs (what would be URL encoded to make it Web URL, but we do not need to do this until we send request - so it is all fine)
@@ -95,14 +96,19 @@ static ClickHouseNodes create(String endpoints, Map<?, ?> defaultOptions) { | |||
} | |||
|
|||
int endIndex = i; | |||
// parsing host name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not fully understand if we are planning to remove this module.
why we are changing ClickHouseNodes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is base module for whole client. I'm changing it to fix a bug in it.
We will use this module for a while because it contains some base classes like ClickhouseClientOptions
Summary
Adds two new configuration options for client and operations:
httpHeader
- to set additional http headers or override already set one'sserverSetting
- to pass settings to a server (thru query parameters in case of HTTP)Closes #1782
Closes #1750
Closes #1665
Checklist
Delete items not relevant to your PR: