File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22export CLASSPATH=" $( find target/ -type f -name ' *.jar' | grep ' \-package' | tr ' \n' ' :' ) "
3- connect-standalone config/worker.properties config/GitHubSourceConnectorExample.properties
3+ if hash docker 2> /dev/null; then
4+ # for docker lovers
5+ docker run -e CLASSPATH=$CLASSPATH \
6+ --net=host --rm \
7+ -v $( pwd) :/kafka-connect-github-source \
8+ -w /kafka-connect-github-source \
9+ confluentinc/cp-kafka-connect:3.2.0 \
10+ connect-standalone config/worker.properties config/GitHubSourceConnectorExample.properties
11+ elif hash connect-standalone 2> /dev/null; then
12+ # for mac users who used homebrew
13+ connect-standalone config/worker.properties config/GitHubSourceConnectorExample.properties
14+ elif [[ -z $KAFKA_HOME ]]; then
15+ # for people who installed kafka vanilla
16+ $KAFKA_HOME /bin/connect-standalone.sh $KAFKA_HOME /etc/schema-registry/connect-avro-standalone.properties config/MySourceConnector.properties
17+ elif [[ -z $CONFLUENT_HOME ]]; then
18+ # for people who installed kafka confluent flavour
19+ $CONFLUENT_HOME /bin/connect-standalone $CONFLUENT_HOME /etc/schema-registry/connect-avro-standalone.properties config/MySourceConnector.properties
20+ else
21+ printf " Couldn't find a suitable way to run kafka connect for you.\n \
22+ Please install Docker, or download the kafka binaries and set the variable KAFKA_HOME."
23+ fi ;
You can’t perform that action at this time.
0 commit comments