-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
executable file
·43 lines (35 loc) · 958 Bytes
/
start.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
41
42
#!/bin/bash
# Kill the remaining kafka in the system
#pids=$(ps aux | grep "[k]afka" | cut -d" " -f3)
# pids=$(ps aux | grep "[k]afka" | awk '{print $2}')
# for pid in $pids;
# do
# kill -9 $pid
# done
#Start zookeper
kafka_2.12-2.1.1/bin/zookeeper-server-start.sh kafka_2.12-2.1.1/config/zookeeper.properties &
sleep 5
#Start kafka Server
kafka_2.12-2.1.1/bin/kafka-server-start.sh kafka_2.12-2.1.1/config/server.properties &
sleep 15
python3 Utils/PreprocessDataSet.py
python3 Twitter.py &
python3 main.py
# Stop kafka
kafka_2.12-2.1.1/bin/kafka-server-stop.sh
sleep 5
# Stop zookeper
kafka_2.12-2.1.1/bin/zookeeper-server-stop.sh
sleep 5
# #pids=$(ps aux | grep "[k]afka" | cut -d" " -f3)
# pids=$(ps aux | grep "[k]afka" | awk '{print $2}')
# for pid in $pids;
# do
# kill -9 $pid
# done
# #pids=$(ps aux | grep "[m]ain.py" | cut -d" " -f3)
# pids=$(ps aux | grep "[m]ain.py" | awk '{print $2}')
# for pid in $pids;
# do
# kill -9 $pid
# done