File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
vagrant/templates/demoscript Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 5050
5151create_and_verify_topic () {
5252# Check if topic exists by checking the REST API on worker node
53- TOPIC_EXISTS=` curl -s -XGET -H ' Accept: application/vnd.kafka.v2+json' ' http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP:$PORT_REST_PROXY/topics/$TOPIC_NAME' | jq ' .message | @text' `
53+ TOPIC_EXISTS=` curl -s -XGET -H " Accept: application/vnd.kafka.v2+json" " http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP :$PORT_REST_PROXY /topics/$TOPIC_NAME " | jq ' .message | @text' `
5454
5555# Create topic if not exists
5656if [[ " $TOPIC_EXISTS " =~ " Topic not found" ]]; then
5757 echo " OK: Topic $TOPIC_NAME does not exist yet."
5858 echo " Creating test topic: $TOPIC_NAME "
59- echo " Talking to broker: $FIRST_BROKER "
59+ echo " Talking to broker: $KAFKA_LOCAL_BROKER_FIRST_IP "
6060 kafka-topics --create --zookeeper $KAFKA_LOCAL_BROKER_FIRST_IP :$PORT_ZOOKEEPER --replication-factor $REPLICATION_FACTOR --partitions $PARTITIONS --topic $TOPIC_NAME
6161 sleep 2
6262else
@@ -71,7 +71,7 @@ kafka-topics --zookeeper $KAFKA_LOCAL_BROKER_FIRST_IP:$PORT_ZOOKEEPER --describe
7171
7272echo " "
7373echo " Verify topic $TOPIC_NAME through REST PROXY:"
74- curl -s -XGET -H ' Accept: application/vnd.kafka.v2+json' ' http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP:$PORT_REST_PROXY/topics/$TOPIC_NAME' | jq ' .'
74+ curl -s -XGET -H " Accept: application/vnd.kafka.v2+json" " http://$KAFKA_LOCAL_WORKERNODE_FIRST_IP :$PORT_REST_PROXY /topics/$TOPIC_NAME " | jq ' .'
7575}
7676
7777
You can’t perform that action at this time.
0 commit comments