11
11
12
12
export _JAVA_OPTIONS=" -Djava.net.preferIPv4Stack=true"
13
13
14
+ export CURL_OPTS=" --fail --show-error --no-progress-meter --location --retry 3 --retry-delay 5"
15
+
14
16
rm -rf build
15
17
mkdir build
16
18
17
19
echo " Setup Kafka version $KAFKA_VERSION "
18
20
if [ ! -e " kafka_2.13-$KAFKA_VERSION .tgz" ]; then
19
21
echo " Kafka not present locally, downloading"
20
- curl -s -o " kafka_2.13-$KAFKA_VERSION .tgz" " https://dlcdn.apache.org/kafka/$KAFKA_VERSION /kafka_2.13-$KAFKA_VERSION .tgz"
22
+ curl $CURL_OPTS -o " kafka_2.13-$KAFKA_VERSION .tgz" " https://dlcdn.apache.org/kafka/$KAFKA_VERSION /kafka_2.13-$KAFKA_VERSION .tgz"
21
23
fi
22
24
cp kafka_2.13-$KAFKA_VERSION .tgz build/kafka.tgz
23
25
mkdir build/kafka && tar xzf build/kafka.tgz -C build/kafka --strip-components 1
@@ -40,7 +42,7 @@ if [ ! -e confluent-community-$CONFLUENT_VERSION.tar.gz ]; then
40
42
echo " Confluent Platform not present locally, downloading"
41
43
CONFLUENT_MINOR=$( echo " $CONFLUENT_VERSION " | sed -n ' s/^\([[:digit:]]*\.[[:digit:]]*\)\.[[:digit:]]*$/\1/p' )
42
44
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
45
+ curl $CURL_OPTS -o confluent-community-$CONFLUENT_VERSION .tar.gz http://packages.confluent.io/archive/$CONFLUENT_MINOR /confluent-community-$CONFLUENT_VERSION .tar.gz
44
46
fi
45
47
cp confluent-community-$CONFLUENT_VERSION .tar.gz build/confluent_platform.tar.gz
46
48
mkdir build/confluent_platform && tar xzf build/confluent_platform.tar.gz -C build/confluent_platform --strip-components 1
@@ -81,7 +83,7 @@ build/kafka/bin/kafka-topics.sh --create --partitions 1 --replication-factor 1 -
81
83
build/kafka/bin/kafka-topics.sh --create --partitions 1 --replication-factor 1 --topic logstash_integration_zstd_topic --bootstrap-server localhost:9092
82
84
build/kafka/bin/kafka-topics.sh --create --partitions 3 --replication-factor 1 --topic logstash_integration_partitioner_topic --bootstrap-server localhost:9092
83
85
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
86
+ curl $CURL_OPTS -o build/apache_logs.txt https://s3.amazonaws.com/data.elasticsearch.org/apache_logs/apache_logs.txt
85
87
cat build/apache_logs.txt | build/kafka/bin/kafka-console-producer.sh --topic logstash_integration_topic_plain --broker-list localhost:9092
86
88
cat build/apache_logs.txt | build/kafka/bin/kafka-console-producer.sh --topic logstash_integration_topic_snappy --broker-list localhost:9092 --compression-codec snappy
87
89
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