-
Notifications
You must be signed in to change notification settings - Fork 410
Update java docs Dec 2025 #4756
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
laeg
left a comment
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.
| import TOCInline from '@theme/TOCInline'; | ||
|
|
||
|
|
||
| <TOCInline toc={toc} /> |
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.
Lets move this into the righthand navbar as it takes up a lot of the documentation
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.
Haha! this is not so easy because we are using snippets. They break navbar.
I've spent two hours playing around with different configs but failed miserably.
I suggest we address it later.
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.
@Blargian
I have a problem that when I create two separate pages under lets say JDBC I get one of them without any bars - just like a standalone page. I'm sure there is something in how these pages are defined in sidebars config.
But I failed to find a way to make it work. I've tried replicate approach from other places but no luck.
If you know the problem I will appreciate any help here.
Thanks!
| Table below shows what old options are supported in the new client and there new meaning. | ||
| ✔ - supported | ||
| ✗ - dropped | ||
| | V1 Configuration | Matching V2 Builder Method | Comments | |
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.
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.
+1 to collocate them in groups.
If the page is large, we can consider moving it to a dedicated page
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.
Ok. I can group them by function.
| | `addEndpoint(String endpoint)` | - `endpoint` - URL formatted a server address. | Adds a server endpoint to list of available servers. Currently only one endpoint is supported. <br/> <br/> Default: `none` <br/> Enum: `none` <br/> Key: `none` | | ||
| | `addEndpoint(Protocol protocol, String host, int port, boolean secure)` | - `protocol` - connection protocol `com.clickhouse.client.api.enums.Protocol#HTTP`.<br />- `host` - IP or hostname of a server.<br />- `secure` - if communication should use secure version of the protocol (HTTPS) | Adds a server endpoint to list of available servers. Currently only one endpoint is supported. <br/> <br/> Default: `none` <br/> Enum: `none` <br/> Key: `none` | | ||
| | `setOption(String key, String value)` | - `key` - String key of the client configuration option.<br /> - `value` - String value of the option | Sets raw value of client options. Useful when reading configuration from properties files. | | ||
| | `setOption(String key, String value)` | - `key` - String key of the client configuration option.<br /> - `value` - String value of the option | Sets raw value of client options. Useful when reading configuration from properties files. | |
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.
same here @Blargian, the docs are a little tough to read if you havent got a wide screen
|
|
||
| :::note Server Settings | ||
|
|
||
| All server settings should be prefixed with `clickhouse_setting_` (same as for the client [configuration](/integrations/language-clients/java/client#server-settings)). |
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.
- We need to add this to the client's list as it's been a constant source of customer complaints.
- What can we do to make this breaking change self-servable? For example, detect unrecognized settings and log a warning to use
clickhouse_setting_prefix
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.
package.json
Outdated
| "form-data": "^4.0.4" | ||
| } | ||
| }, | ||
| "packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" |
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.
not sure it needs to be committed to the repo
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.
you are right.
@Blargian is it possible to move all dynamic files that part of a build under specific folder?
We usually use build or target so we can exclude them from git staging.
Thanks!
|
@Blargian many thanks for grouping configuration parameters! |
…into update_java_docs_nov_2025
| .build(); | ||
| ``` | ||
|
|
||
| `Client` is `AutoCloseable` and should be closed when not needed anymore. |
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.
should be closed
Should we extend the example above to include this?
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 true for older client. I will add something about resource management.
| ## Client Configuration {#client-configuration} | ||
|
|
||
| <Tabs groupId="client-config"> | ||
| <TabItem value="connection" label="Connection & Endpoints"> |
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.
not a blocker for the PR, @Blargian what can we do to make the table easy readable? right now, the Default column might be disproportionately large
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.
Fixed
| ... | ||
| } | ||
| ``` | ||
| When options are set via `setOption` method (either the `Client.Builder` or operation settings class) then server settings name should be prefixed with `clickhouse_setting_`. The `com.clickhouse.client.api.ClientConfigProperties#serverSetting()` may be handy in this case. |
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.
Should we wrap this wrapper into an note snippet?
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.
note snipped I think is quite heavy. I've put
| - Client V2 `async` settings is `off` by default. It means no extra threads and more application control over client. This setting should be `off` for majority of use cases. Enabling `async` will create a separate thread for a request. It only make sense when using application controlled | ||
| executor (see `com.clickhouse.client.api.Client.Builder#setSharedOperationExecutor`) | ||
|
|
||
| ### Writing Data |
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 there an example in the repository comparing the snippets back to back? like
examples/insert_v1.java
examples/insert_v2.java
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.
Done.
| | `ClickHouseClientOption#RETRY` | `Client.Builder#setMaxRetries` | See also `retryOnFailures` | | ||
| | `ClickHouseHttpOption#AHC_RETRY_ON_FAILURE` | `Client.Builder#retryOnFailures` | | | ||
| | `ClickHouseClientOption#FAILOVER` | ✗ | | | ||
| | `ClickHouseClientOption#REPEAT_ON_SESSION_LOCK` | ✗ | | |
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.
one of the problem with TabIteams, is that none Cmd + F nor search able to find the settings.
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.
May be we need to extract reference information to another page?
So any client doc will be in two parts: Narrative about client, its features and reference information.
GCP is a good example.
| We recommend using the latest java client directly if performance/direct access is critical. | ||
| ::: | ||
|
|
||
| ## Changes from 0.7.x {#changes-from-07x} |
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.
Should it be Migration guide?
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.
Done.
|
|
||
| ## Supported data types {#supported-data-types} | ||
|
|
||
| JDBC Driver supports the same data formats as the underlying [java client](/integrations/language-clients/java/client/client.mdx). |
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.
Should it be a link to a specific section of the client documentation?
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.
fixed
| ## Supplying Credentials and Settings {#supplying-credentials-and-settings} | ||
|
|
||
| ```java showLineNumbers | ||
| String url = "jdbc:ch://localhost:8123?jdbc_ignore_unsupported_values=true&socket_timeout=10"; |
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.
could you add an example of a server setting configuration?
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.
done
| queryParams.put("param1", 2); | ||
|
|
||
| try (QueryResponse response = | ||
| client.query("SELECT * FROM " + table + " WHERE col1 >= {param1:UInt32}", queryParams, new QuerySettings()).get()) { |
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 wonder if we should a section for query parametrisation
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.
yes we need.
|
@mshustov thank you for the review! I will correct doc this week and will add more information. So I've returned it to the draft state. |
Summary
Checklist