-
Notifications
You must be signed in to change notification settings - Fork 3
/
v2_pt_remove_fed_request_connectors.sh
executable file
·62 lines (44 loc) · 1.53 KB
/
v2_pt_remove_fed_request_connectors.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# set -e
curr_dir=$(pwd)
source .env
broker_container_name=broker
broker_internal_host=broker
broker_internal_port=${BROKER_INTERNAL_PORT}
connect_container=connect
connect_host=${CONNECT_HOST}
connect_port=${CONNECT_PORT}
schema_registry_container=schema-registry
schema_registry_internal_host=schema-registry
schema_registry_local_host=localhost
schema_registry_port=${SCHEMA_REGISTRY_PORT}
./scripts/list_plugins.sh
./scripts/list_connectors.sh
./scripts/list_subjects.sh
./scripts/list_topics.sh
event_dir=${curr_dir}/analytics/v2_events
./scripts/delete_connector.sh far_sink_connectors
for item in {1..9}
# for item in $1
do
request_topic=far_${item}
./scripts/delete_subject.sh ${request_topic}-key
./scripts/delete_subject.sh ${request_topic}-value
./scripts/delete_topic.sh ${request_topic}
done
for item in {1..9}
# for item in $1
do
response_topic=fas_${item}
./scripts/delete_connector.sh ${response_topic}_source_connector
./scripts/delete_subject.sh ${response_topic}-key
./scripts/delete_subject.sh ${response_topic}-value
./scripts/delete_topic.sh ${response_topic}
done
./scripts/list_connectors.sh
./scripts/list_subjects.sh
./scripts/list_topics.sh
echo 'Removing federated request in the Analytics Pipeline ...'
sudo cp analytics/v2_neo4j/v2_cleanup_entities.cql neo4j/import/.
docker exec -u ${NEO4J_USERNAME} --interactive --tty neo4j cypher-shell -u ${NEO4J_USERNAME} -p ${NEO4J_PASSWORD} --file /import/v2_cleanup_entities.cql
echo 'Constraints and indexes are created ✅'