Add scripts to build pulsar and kafka adapters and manually test against local pulsar cluster

This commit is contained in:
Massimiliano Mirelli 2023-03-07 14:52:21 +02:00
parent 8eb9498fa9
commit 0a2ab1dcca
6 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#!/usr/local/bin/bash
(
cd "$(git rev-parse --show-toplevel)" && \
mvn clean install -DskipTests -pl adapters-api,adapter-kafka,nb5
)

View File

@ -0,0 +1,20 @@
#!/usr/local/bin/bash
: "${REBUILD:=1}"
: "${CYCLES:=1000000000}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
if [[ ${REBUILD} -eq 1 ]]; then
"${SCRIPT_DIR}/build-nb-kafka-driver.sh"
fi
java -jar nb5/target/nb5.jar \
run \
driver=kafka \
-vv \
--report-interval 5 \
--docker-metrics \
cycles=${CYCLES} \
threads=1 \
num_clnt=1 \
num_cons_grp=1 \
yaml="${SCRIPT_DIR}/kafka_consumer.yaml" \
config="${SCRIPT_DIR}/kafka_config.properties" \
bootstrap_server=PLAINTEXT://localhost:9092

View File

@ -0,0 +1,22 @@
#!/usr/local/bin/bash
: "${REBUILD:=1}"
: "${CYCLES:=1000000000}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
if [[ ${REBUILD} -eq 1 ]]; then
"${SCRIPT_DIR}/build-nb-kafka-driver.sh"
fi
while [[ 1 -eq 1 ]]; do
java -jar nb5/target/nb5.jar \
run \
driver=kafka \
-vv \
--report-interval 5 \
--docker-metrics \
cycles="${CYCLES}" \
threads=1 \
num_clnt=1 \
yaml="${SCRIPT_DIR}/kafka_producer.yaml" \
config="${SCRIPT_DIR}/kafka_config.properties" \
bootstrap_server=PLAINTEXT://localhost:9092
sleep 10
done

View File

@ -0,0 +1,5 @@
#!/usr/local/bin/bash
(
cd "$(git rev-parse --show-toplevel)" && \
mvn clean install -DskipTests -pl adapters-api,adapter-pulsar,nb5
)

View File

@ -0,0 +1,16 @@
#!/usr/local/bin/bash
: "${REBUILD:=1}"
: "${CYCLES:=1000000000}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
if [[ ${REBUILD} -eq 1 ]]; then
"${SCRIPT_DIR}/build-nb-pulsar-driver.sh"
fi
java -jar nb5/target/nb5.jar \
run \
driver=pulsar \
-vv \
--report-interval 5 \
--docker-metrics \
cycles=${CYCLES} \
yaml="${SCRIPT_DIR}/yaml_examples/consumer_4KB_workload.yaml" \
config="${SCRIPT_DIR}/config.properties"

View File

@ -0,0 +1,22 @@
#!/usr/local/bin/bash
: "${REBUILD:=1}"
: "${CYCLES:=1000000000}"
: "${CYCLERATE:=100}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
if [[ ${REBUILD} -eq 1 ]]; then
"${SCRIPT_DIR}/build-nb-pulsar-driver.sh"
fi
while [[ 1 -eq 1 ]]; do
java -jar nb5/target/nb5.jar \
run \
driver=pulsar \
-vv \
--report-interval 5 \
--docker-metrics \
cycles="${CYCLES}" \
cyclerate="${CYCLERATE}" \
threads=1 \
yaml="${SCRIPT_DIR}/yaml_examples/producer_4KB_workload.yaml" \
config="${SCRIPT_DIR}/config.properties"
sleep 10
done