Skip to content

Commit f5848d0

Browse files
committed
use better curl options to still see errors but not the progress meter
1 parent 31f2e73 commit f5848d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

kafka_test_setup.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ else
1010
fi
1111

1212
export _JAVA_OPTIONS="-Djava.net.preferIPv4Stack=true"
13+
export CURL_OPTS="--fail --show-error --no-progress-meter --location --retry 3 --retry-delay 5"
1314

1415
rm -rf build
1516
mkdir build
1617

1718
echo "Setup Kafka version $KAFKA_VERSION"
1819
if [ ! -e "kafka_2.13-$KAFKA_VERSION.tgz" ]; then
1920
echo "Kafka not present locally, downloading"
20-
curl -s -o "kafka_2.13-$KAFKA_VERSION.tgz" "https://archive.apache.org/dist/kafka/$KAFKA_VERSION/kafka_2.13-$KAFKA_VERSION.tgz"
21+
curl $CURL_OPTS -o "kafka_2.13-$KAFKA_VERSION.tgz" "https://archive.apache.org/dist/kafka/$KAFKA_VERSION/kafka_2.13-$KAFKA_VERSION.tgz"
2122
fi
2223
cp kafka_2.13-$KAFKA_VERSION.tgz build/kafka.tgz
2324
mkdir build/kafka && tar xzf build/kafka.tgz -C build/kafka --strip-components 1
@@ -40,7 +41,7 @@ if [ ! -e confluent-community-$CONFLUENT_VERSION.tar.gz ]; then
4041
echo "Confluent Platform not present locally, downloading"
4142
CONFLUENT_MINOR=$(echo "$CONFLUENT_VERSION" | sed -n 's/^\([[:digit:]]*\.[[:digit:]]*\)\.[[:digit:]]*$/\1/p')
4243
echo "CONFLUENT_MINOR is $CONFLUENT_MINOR"
43-
curl -s -o confluent-community-$CONFLUENT_VERSION.tar.gz http://packages.confluent.io/archive/$CONFLUENT_MINOR/confluent-community-$CONFLUENT_VERSION.tar.gz
44+
curl $CURL_OPTS -o confluent-community-$CONFLUENT_VERSION.tar.gz http://packages.confluent.io/archive/$CONFLUENT_MINOR/confluent-community-$CONFLUENT_VERSION.tar.gz
4445
fi
4546
cp confluent-community-$CONFLUENT_VERSION.tar.gz build/confluent_platform.tar.gz
4647
mkdir build/confluent_platform && tar xzf build/confluent_platform.tar.gz -C build/confluent_platform --strip-components 1
@@ -81,7 +82,7 @@ build/kafka/bin/kafka-topics.sh --create --partitions 1 --replication-factor 1 -
8182
build/kafka/bin/kafka-topics.sh --create --partitions 1 --replication-factor 1 --topic logstash_integration_zstd_topic --bootstrap-server localhost:9092
8283
build/kafka/bin/kafka-topics.sh --create --partitions 3 --replication-factor 1 --topic logstash_integration_partitioner_topic --bootstrap-server localhost:9092
8384
build/kafka/bin/kafka-topics.sh --create --partitions 3 --replication-factor 1 --topic logstash_integration_static_membership_topic --bootstrap-server localhost:9092
84-
curl -s -o build/apache_logs.txt https://s3.amazonaws.com/data.elasticsearch.org/apache_logs/apache_logs.txt
85+
curl $CURL_OPTS -o build/apache_logs.txt https://s3.amazonaws.com/data.elasticsearch.org/apache_logs/apache_logs.txt
8586
cat build/apache_logs.txt | build/kafka/bin/kafka-console-producer.sh --topic logstash_integration_topic_plain --broker-list localhost:9092
8687
cat build/apache_logs.txt | build/kafka/bin/kafka-console-producer.sh --topic logstash_integration_topic_snappy --broker-list localhost:9092 --compression-codec snappy
8788
cat build/apache_logs.txt | build/kafka/bin/kafka-console-producer.sh --topic logstash_integration_topic_lz4 --broker-list localhost:9092 --compression-codec lz4

0 commit comments

Comments
 (0)