Skip to content

Commit

Permalink
Bugfixes: inconsistent parameters make me mad
Browse files Browse the repository at this point in the history
  • Loading branch information
itadventurer committed Jun 26, 2019
1 parent aac3a6a commit 197d710
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/kafka-console-consumer
2 changes: 1 addition & 1 deletion bin/kafka-console-producer
2 changes: 1 addition & 1 deletion bin/kafka-consumer-perf-test
2 changes: 1 addition & 1 deletion bin/kafka-streams-application-reset
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
BOOTSTRAP_SERVERS_PARAM="--bootstrap-servers"
TLS_CONFIG_PARAM="--command-config"
TLS_CONFIG_PARAM="--config-file"
source $(dirname $0)/run-kafka-cli-tool.sh
2 changes: 1 addition & 1 deletion bin/kafka-verifiable-consumer
2 changes: 1 addition & 1 deletion bin/kafka-verifiable-producer
4 changes: 4 additions & 0 deletions bin/run-cli-tool-with-kafka-bootstrap-server-consumer
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
BOOTSTRAP_SERVERS_PARAM="--bootstrap-server"
TLS_CONFIG_PARAM="--consumer.config"
source $(dirname $0)/run-kafka-cli-tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ DIR=$( dirname "${BASH_SOURCE[0]}" )
source "$DIR/utils.sh"

PARAMS=$(add_bootstrap_servers "$PARAMS" "--broker-list")
PARAMS=$(add_tls "$PARAMS" "--config-file")
PARAMS=$(add_tls "$PARAMS" "--consumer.config")

exec $KAFKA_CLI_DIR/$(basename $0).sh $PARAMS
9 changes: 9 additions & 0 deletions bin/run-cli-tool-with-kafka-broker-list-producer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
PARAMS="$@"
DIR=$( dirname "${BASH_SOURCE[0]}" )
source "$DIR/utils.sh"

PARAMS=$(add_bootstrap_servers "$PARAMS" "--broker-list")
PARAMS=$(add_tls "$PARAMS" "--producer.config")

exec $KAFKA_CLI_DIR/$(basename $0).sh $PARAMS
2 changes: 1 addition & 1 deletion bin/test-toolbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function test_script {

echo -e -n "\b"

if [ -z "$(cat /tmp/err)" ] || [ "$(cat /tmp/err)" != "Processed a total of 2 messages\n" ] ; then
if [ -z "$(cat /tmp/err)" ] || [ "$(cat /tmp/err)" == "Processed a total of 2 messages\n" ] ; then
echo -e "${bold}${green}${normal}"
else
echo -e "${bold}${red}${normal}"
Expand Down
2 changes: 1 addition & 1 deletion bin/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function add_tls() {
echo "ssl.truststore.location: $TRUSTSTORE_LOCATION" >> $CONFIG_FILE
echo "ssl.truststore.password: $KEYSTORE_PASSWORD" >> $CONFIG_FILE

add_param_from_env $CONFIG_FILE "$PARAM" "$PARAMS"
PARAMS=$(add_param_from_env $CONFIG_FILE "$PARAM" "$PARAMS")
fi
echo "$PARAMS"
}
Expand Down

0 comments on commit 197d710

Please sign in to comment.