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

Keeper Client #47414

Merged
merged 31 commits into from
Jun 2, 2023
Merged

Keeper Client #47414

merged 31 commits into from
Jun 2, 2023

Conversation

pufit
Copy link
Member

@pufit pufit commented Mar 10, 2023

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Added native ClickHouse Keeper CLI Client.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

#46229

Example

./clickhouse-keeper-client localhost:2181 --connection-timeout 30 --session-timeout 30 --operation-timeout 30
Connected to ZooKeeper at [::1]:2181 with session_id 137
/ :) ls
keeper pufit foo bar
/ :) cd keeper
/keeper :) ls
api_version
/keeper :) cd api_version
/keeper/api_version :) ls

/keeper/api_version :) cd lolkek
Path /keeper/api_version/lolkek does not exists
/keeper/api_version :) cd ../../
/ :) ls
keeper pufit foo bar
/ :) get keeper/api_version
2

@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-feature Pull request with new product feature label Mar 10, 2023
@antonio2368 antonio2368 self-assigned this Mar 10, 2023
dbms
)

clickhouse_program_add(keeper-client)
Copy link
Member

Choose a reason for hiding this comment

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

would be nice to have it as a standalone binary so maybe think early about minimizing included libs?
This is just a suggestion so feel free to do it in any way you think it's easiest for you.

Copy link
Member

Choose a reason for hiding this comment

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

@antonio2368 Initial idea was to include this client only to standalone keeper and bigger clickhouse binary

Copy link
Member

Choose a reason for hiding this comment

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

that also works

@nikitamikhaylov
Copy link
Member

I'm thinking that it would be also nice and easy to support 4 letter commands. The output will be like this

:) ruok
imok
:) mntr
zk_version	v23.3.1.2537-testing-52bf836e03a6ba7cf2d654eaaf73231701abc3a2
zk_avg_latency	0
zk_max_latency	0
zk_min_latency	0
zk_packets_received	0
zk_packets_sent	0
zk_num_alive_connections	0
zk_outstanding_requests	0
zk_server_state	standalone
zk_znode_count	3
zk_watch_count	0
zk_ephemerals_count	0
zk_approximate_data_size	612
zk_key_arena_size	4096
zk_latest_snapshot_size	0
zk_open_file_descriptor_count	33
zk_max_file_descriptor_count	18446744073709551615
zk_followers	0
zk_synced_followers	0

@pufit pufit marked this pull request as ready for review March 11, 2023 04:12
@nikitamikhaylov nikitamikhaylov force-pushed the 46229-repl-clickhouse-keeper branch from c2c7288 to 3380e46 Compare March 31, 2023 12:43
Copy link
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

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

.

@robot-ch-test-poll2
Copy link
Contributor

robot-ch-test-poll2 commented May 25, 2023

This is an automated comment for commit 362055c with description of existing statuses. It's updated for the latest CI running
The full report is available here
The overall status of the commit is 🟢 success

Check nameDescriptionStatus
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR🟢 success
Docs CheckBuilds and tests the documentation🟢 success
Mergeable CheckChecks if all other necessary checks are successful🟢 success
Push to DockerhubThe check for building and pushing the CI related docker images to docker hub🟢 success
Style CheckRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report🟢 success

@nikitamikhaylov
Copy link
Member

CC @alexey-milovidov Merging is blocked until the requested changes are addressed...

@pufit pufit merged commit 3f5ff27 into master Jun 2, 2023
@pufit pufit deleted the 46229-repl-clickhouse-keeper branch June 2, 2023 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature Pull request with new product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants