-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands.sh
More file actions
35 lines (27 loc) · 1.35 KB
/
commands.sh
File metadata and controls
35 lines (27 loc) · 1.35 KB
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
#################################################
#################### Docker #####################
#################################################
docker exec -it dsi_postgres /bin/bash
# troubleshooting container
docker build -t debug-tools .
docker run -it --rm --network dsi_custom_bridge debug-tools
#################################################
################### Postgres ####################
#################################################
psql -h dsi_postgres -p 5432 -U postgres -d postgres
#################################################
#################### Kafka ######################
#################################################
# consume from topic
bin/kafka-console-consumer.sh --bootstrap-server kafka_00:9094 --topic stocks_topic --from-beginning
# delete a topic
bin/kafka-topics.sh --bootstrap-server kafka_00:9094 --delete --topic stocks_topic
# list topics
bin/kafka-topics.sh --bootstrap-server kafka_00:9094 --list
# create topic
bin/kafka-topics.sh --bootstrap-server kafka_00:9094 --create --replication-factor 1 --partitions 1 --config cleanup.policy=compact --topic connect-offsets
# deploy connector
curl -X POST -H "Content-Type: application/json" --data @kafka_connect/connector_stocks_topic_to_postgres.yaml http://localhost:8083/connectors
### Kafka Connect
# check running connectors
curl http://localhost:8083/connectors/