-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_topics.sh
executable file
·24 lines (18 loc) · 1.13 KB
/
create_topics.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
ZK=localhost:2181
if [ $# -eq 0 ]; then
echo "usage: $0 partitions"
exit
fi
PARTITIONS=$1
shift
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic flights
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic nearest-airport
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic nearest-airport-count
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic nearest-airport-agg
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic nearest-airport-agg-count
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic red
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic blue
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic distance
kafka-topics --zookeeper ${ZK} --create --partitions ${PARTITIONS} --replication-factor 3 --topic closest
kafka-topics --zookeeper ${ZK} --list