Skip to content
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

[Java Client] Reorganized documentation #2646

Merged
merged 15 commits into from
Sep 30, 2024
Merged

Conversation

chernser
Copy link
Contributor

@chernser chernser commented Sep 19, 2024

Summary

  • Structured sections for each client in same way
  • Moved common information on the top
  • Updated versions of artifacts
  • Added Client-V2 documentation
  • Added a few important notes
  • Documentation split into a designates pages

- `http://(https://[email protected]:443`
- `tcp://localhost?!auto_discovery#experimental),(grpc://localhost#experimental)?failover=3#test`
All settings are defined by instance methods (a.k.a configuration methods) that make scope and context of each value clear.
Major configuration parameters are defined in one scope (client or operation) and do not override each other. Handling
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't operation-level parameter override a parameter defined on the instance level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only in some cases, for example timeouts.
We do not guarantee to make all settings overridable because in certain cases it would mean creating another client instance. For example, we may not turn-off connection pool for an operation.

docs/en/integrations/language-clients/java/index.md Outdated Show resolved Hide resolved
The library provides all need to send requests and parse responses.

First Java client was developed far back in 2015. We have refactored it in 2024 and have introduced a new component - `client-v2`. New implementation has
new improved API, new underlying implementation and many other improvements.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

improvements maybe we can link to a section of improvements if there is already one if not to create one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've re-phrased.

docs/en/integrations/language-clients/java/index.md Outdated Show resolved Hide resolved
# Java Client (V2)

Implementation of a new API. It uses Apache Http Client to communicate with ClickHouse server. We have selected this http client because it has many built-in features and
has proven itself in old client implementation. We are planning to support other http client libraries.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would explain why we did it (from an API simplicity perspective)
Why we are saying We are planning to support other http client libraries

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reworked this section for both clients. It actually should explain what is this library.

docs/en/integrations/language-clients/java/client-v2.md Outdated Show resolved Hide resolved
docs/en/integrations/language-clients/java/client-v2.md Outdated Show resolved Hide resolved
docs/en/integrations/language-clients/java/r2dbc.md Outdated Show resolved Hide resolved
docs/en/integrations/language-clients/java/client-v1.md Outdated Show resolved Hide resolved
Major configuration parameters are defined in one scope (client or operation) and do not override each other. Handling
configuration overriding across is a very hard task so we doing our best to keep it simple.

This section describes only client wide settings. Each operation may have own and will be listed in the their sections.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section doesn't describe any settings. Should we remove this part?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gave a reference to builder class for docs. Will fill this section a bit later.

docs/en/integrations/language-clients/java/index.md Outdated Show resolved Hide resolved
docs/en/integrations/language-clients/java/jdbc-driver.md Outdated Show resolved Hide resolved
sidebars.js Show resolved Hide resolved

## Supported data types

JDBC Driver supports same data formats as client library does.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
JDBC Driver supports same data formats as client library does.
JDBC Driver supports same data formats as [the client library does](/docs/en/integrations/java).

options.put("custom_http_headers", "X-ClickHouse-Quota=test, X-ClickHouse-Test=test");
```

## JDBC Driver
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be on the JDBC driver page

Copy link
Member

@mshustov mshustov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a couple of minor nits. Let's :shipit:

@chernser chernser merged commit ae42165 into main Sep 30, 2024
4 checks passed
@chernser chernser deleted the java_client_docs_update_0918 branch September 30, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants