-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
PIP-123: Introduce Pulsar metadata CLI tool #13346
Comments
I think it's will be very useful. |
After this pip is passed, can I help? |
2 tasks
The issue had no activity for 30 days, mark with Stale label. |
I will try it. |
The issue had no activity for 30 days, mark with Stale label. |
This looks interesting I'll be looking into it for a while |
2 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
For a very long time, we have included a CLI command to start the ZooKeeper
shell utility:
pulsar zookeeper-shell
, which is essentially a repackagingof the ZooKeeper tool
zkCli.sh
.This is useful in some cases to either verify the content of metadata or
to perform cleanup and modification tasks for which there is not an available
option through the Pulsar REST APIs.
While it's very useful, there are some drawbacks with the
zookeeper-shell
as it is today:
1. This is only a ZooKeeper tool (obviously). Since we are adding more
metadata backends, we should have a tool that works across all the
implementations and presents a single consistent interface.
2. ZooKeeper shell is designed to be an interactive shell and it's not very
good when trying to do non-interactive scriptable operations.
3. ZooKeeper is a bit clunky when using it and it requires the user to retype
paths many times. The commands are not very intuitive or documented.
It's not possible to update z-node with multi-lines content.
4. We cannot easily add functionality or improvements into ZooKeeper shell,
since it belongs to a different project and the tool has been stagnating
for many years.
5. In cases where the z-nodes content is binary (Protobuf) or compressed, there
is no easy way to inspect the content from the ZooKeeper shell.
Additionally, we can format and colorize JSON content to make it easier to
read.
6. The paths used for metadata resources are also often using encodings that
make it more difficult to construct on the shell tool.
Part of what is described here is in the
pulsar-managed-ledger-admin
CLI tool,though that is a Python script that requires additional dependencies that are
not typically installed, it only works with ZooKeeper, and it only targets
accessing the managed ledger metadata.
Goal
Introduce a new Java CLI tool to access, inspect and modify metadata that solves
all the issues described above.
We would leave the
zookeeper-shell
command for now. In the future, once thenew tool is proven, we can consider removing the
zookeeper-shell
command.Proposed changes
Add a new command:
with several subcommands:
Get
Examples:
Delete
Examples:
Scan
Examples:
Shell
The text was updated successfully, but these errors were encountered: