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