devshawn / kafka-shell Goto Github PK
View Code? Open in Web Editor NEW⚡A supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.
License: Apache License 2.0
⚡A supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
See discussion in #15
Describe the solution you'd like
Using kafka-shell
with a docker image that uses .sh
commands (e.g. kafka-topics.sh
instead of just `kafka-topics, which seems to be the default behavior provided by Apache Kafka) should not result in an error:
OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"kafka-topics\": executable file not found in $PATH": unknown
command terminated with exit code 126
Some known images that result in this problem:
Additional context
Note that with this fix in place, running commands against docker deployed kafka should work with the following additional configuration in ~/.kafka-shell/config
: command_prefix: kubectl exec svc/kafka1 --
kafka-shell works fine using environment variables for bootstrap server and zookeeper, but barfs at schema_registry_url due to a validation error
To Reproduce
Use a config.yaml file like this
version: 1
enable:
history: true
save_on_exit: true
auto_complete: true
auto_suggest: true
inline_help: true
fuzzy_search: true
cluster: local
clusters:
local:
bootstrap_servers: $BOOTSTRAP_SERVER
zookeeper_connect: $ZOO_KEEPER
schema_registry_url: $SCHEMA_REGISTRY
Expected behavior
It should evalute the environment variables
Screenshots
[root@d89fde020d7f /]# kafka-shell
Invalid user configuration (clusters, local, schema_registry_url): '$SCHEMA_REGISTRY' does
not match '^https?://(.*)$'
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
kafka-shell
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Hi Shawn- First of all great work!. I'm working on adding extra kafka commands into this shell. Any pointers? I was able to add to add custom command into the menu but options execution throws error. I thought to reach out to you for the pointers so that I can add some commands to this and take it forward.
Thanks
Allow commands to be piped for things such as | grep
. It works for commands that have no auto-fill from config (like when you actually specify --zookeeper
, but otherwise fails.
Hello,
first this looks great, thanks for it.
Second, is there a way to add support for Kafka's ACL on the consumer and producer commands ( all would be great too ) in the config file or somewhere we don't need to retype?
Cheers
Add support for the command:
kafka-reassign-partitions
the config.yml files are removed once signoff of remote server.
best regards.
Ignacio F
Describe the bug
A clear and concise description of what the bug is.
here's my output
hadoop@pascal-asus:/kafka$ kafka-shell/kafka$
Invalid user configuration (root): None is not of type 'object'
hadoop@pascal-asus:
To Reproduce
Steps to reproduce the behavior:
kafka-shell
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Auto fill --command-config
for commands, like we auto-fill --consumer.config
and --producer.config
.
First I'd like to say this is a great project. This is saving me an enormous amount of typing being able to easily switch between environments etc. Thanks 👍
When trying out the config auto-complete I noticed it's not yet supported for all commands.
It does work for kafka-configs
:
But when checking this for kafka-[avro]-consoler-consumer
, I see that the auto-complete doesn't work yet:
I'm new to Kafka and I had a hard time understanding how to interact with the cluster that I had setup in docker-compose
running on my mac. The way the CLI tools are packaged with Kafka was not intuitive to me.
I found kafka-shell
when I was looking for something to make connecting and managing my local (docker) cluster a bit easier; I think it's fantastic. It would be great for my use case if you could include some documentation on what a good config might look like for working with kafka in docker for development. I think this is probably a fairly common usage.
For instance:
I found that prefixing the command with a docker exec
as descried in the CONFIGURATION.md
didn't quite work because the image that I'm using does not have the Kafka bin directory exported to the PATH - is there a specific image I should use for these shell scripts? I'm using wurstmeister/kafka
Add support for the command:
kafka-preferred-replica-election
Add support for the command:
kafka-replica-verification
Hi
Can I connect to a remote Kafka cluster ( not local) using this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.