-
Notifications
You must be signed in to change notification settings - Fork 0
/
reset2.sh
executable file
·40 lines (30 loc) · 881 Bytes
/
reset2.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
function kt() {
kafka-topics --zookeeper localhost:2181 $*
}
function kt-create() {
kt --create --partitions 8 --replication-factor 1 --topic $*
}
function kt-delete() {
kt --delete --topic $*
}
function kcg() {
kafka-consumer-groups --bootstrap-server localhost:9092 $*
}
function kcg-reset() {
kcg --reset-offsets --to-earliest --all-topics --execute --group $*
}
#Set this in KSQL
#SET 'auto.offset.reset' = 'earliest';
#SET 'ksql.sink.partitions' = '8';
#
#
#
kafka-consumer-groups --bootstrap-server localhost:9092 --reset-offsets --to-earliest --all-topics --execute --group demo-map
#kt-delete KSQL_RED_NEAREST_AIRPORT
#kt-create KSQL_RED_NEAREST_AIRPORT
kt-delete KSQL_RED_NEAREST_AIRPORT_WINDOW_COUNT
kt-create KSQL_RED_NEAREST_AIRPORT_WINDOW_COUNT
kt-delete KSQL_RED_NEAREST_AIRPORT_COUNT
kt-create KSQL_RED_NEAREST_AIRPORT_COUNT
kt --list