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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chernser
Copy link

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

Checklist


### Installation
*Note*: Client-V2 is currently in the phase of active development and we are still working on it.
Copy link
Member

Choose a reason for hiding this comment

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

Im not sure what it means for the end user: that the v2 is not stable?

- `http://(https://explorer@play.clickhouse.com: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?

```

### Supported data types
`Client` is `AutoCloseable` and should be closed when not needed anymore.
Copy link
Member

Choose a reason for hiding this comment

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

It's quite an important change. Should we move above the code snippet?


```java
// Important step (done once) - register class to pre-compile object serializer according to the table schema.
client.register(ArticleViewEvent.class, client.getTableSchema(TABLE_NAME));
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a link to a complete example?

```

Connect to a single node:
If data is already in the format that ClickHouse accepts, then:
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
If data is already in the format that ClickHouse accepts, then:
If data is already in [the format that ClickHouse accepts](/docs/en/interfaces/formats), then:


### Examples

- Example code is available in [repo](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2)
Copy link
Member

Choose a reason for hiding this comment

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

Adding a link with examples to each section (insert, query, etc.) would improve UX

- Example code is available in [repo](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2)
- Reference Spring Service [implementation](https://github.com/ClickHouse/clickhouse-java/tree/main/examples/demo-service)

## Client-V1
Copy link
Member

Choose a reason for hiding this comment

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

I'd consider spitting the docs into different pages. A quick search for a term (eg, query) might land a reader on a wrong version.

### Features
#### Compression

The client will by default use LZ4 compression, which requires this dependency:
Copy link
Member

Choose a reason for hiding this comment

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

If it's relevant for both clients, I see no problem in duplicating the information. especially if we split them into separate pages

```

### Compression
### Query API
Copy link
Member

Choose a reason for hiding this comment

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

I would expand the section with more specific examples: create a table, select, drop, etc. It can be done in a follow-up

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.

2 participants