Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lensesio/kafka-connect-tools
Kafka Connect Tooling
https://github.com/lensesio/kafka-connect-tools
cli kafka kafka-connect
Last synced: 4 months ago
JSON representation
Kafka Connect Tooling
- Host: GitHub
- URL: https://github.com/lensesio/kafka-connect-tools
- Owner: lensesio
- License: apache-2.0
- Archived: true
- Created: 2016-03-25T10:37:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-17T11:41:48.000Z (over 3 years ago)
- Last Synced: 2024-05-18T22:22:31.799Z (6 months ago)
- Topics: cli, kafka, kafka-connect
- Language: Scala
- Size: 11.5 MB
- Stars: 120
- Watchers: 38
- Forks: 33
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kafka - kafka-connect-tools
README
Connect tools is Maven
```bash
com.datamountaineer
kafka-connect-cli
1.0.7```
## Requirements
* Java 1.8
* Gradle 5Kafka Connect CLI
=================This is a tiny command line interface (CLI) around the [Kafka Connect REST Interface](http://docs.confluent.io/3.0.1/connect/userguide.html#rest-interface) to manage connectors.
It is used in a git like fashion where the first program argument indicates the command: it can be one of `[ps|get|rm|create|run|status|status|plugins|describe|validate|restart|pause|resume]`.The CLI is meant to behave as a good unix citizen: input from `stdin`; output to `stdout`;
out of band info to `stderr` and non-zero exit status on error. Commands
dealing with configuration expect or produce data in .properties
style: `key=value` lines and comments start with a `#`.connect-cli 1.0.8
Usage: connect-cli [ps|get|rm|create|run|diff|status|plugins|describe|validate|restart|pause|resume] [options] []--help
prints this usage text
-e | --endpoint
Kafka Connect REST URL, default is http://localhost:8083/
-f | --format
Format of the config, default is PROPERTIES. Valid options are 'properties' and 'json'.Command: ps
list active connectors names.
Command: get
get the configuration of the specified connector.
Command: rm
remove the specified connector.
Command: create
create the specified connector with the config from stdin; the connector cannot already exist.
Command: run
create or update the specified connector with the config from stdin.
Command: diff
diff the specified connector with the config from stdin.
Command: status
get connector and it's task(s) state(s).
Command: plugins
list the available connector class plugins on the classpath.
Command: describe
list the configurations for a connector class plugin on the classpath.
Command: pause
pause the specified connector.
Command: restart
restart the specified connector.
Command: resume
resume the specified connector.
Command: validate
validate the connector config from stdin against a connector class plugin on the classpath.
Command: task_ps
list the tasks belonging to a connector.
Command: task_status
get the status of a connector task.
Command: task_restart
restart the specified connector task.
You can override the default endpoint by setting an environment variable `KAFKA_CONNECT_REST` i.e.export KAFKA_CONNECT_REST="http://myserver:myport"
To Build
========```bash
gradle buildCli
```Usage
=====Clone this repository, do a `gradle buildCli` and run the jar in a way you prefer, for example with the provided `cli` shell script. The CLI can be used as follows.
Get Active Connectors
---------------------Command: `ps`
Example:
$ bin/connect-cli ps
twitter-sourceGet Connector Configuration
---------------------------Command: `get`
Example:
$ bin/connect-cli get twitter-source
#Connector `twitter-source`:
name=twitter-source
tasks.max=1(snip)
track.terms=test
#task ids: 0Delete a Connector
------------------Command: `rm`
Example:
$ bin/connect-cli rm twitter-source
Create a New Connector
----------------------The connector cannot already exist.
Command: `create`
Example:
$ bin/connect-cli create twitter-source