Skip to content
Snippets Groups Projects
Commit ed51b544 authored by Björn Vonheiden's avatar Björn Vonheiden
Browse files

enchance topic deletion in run uc py

parent 34ef183a
No related branches found
No related tags found
2 merge requests!42Integerate theodolite and run uc python scripts,!24run UC as python implementation
This commit is part of merge request !24. Comments created here will be created in the context of that merge request.
......@@ -325,11 +325,13 @@ def delete_topics(topics):
"""
print('Delete topics from Kafka')
topics_delete = 'theodolite-.*|' + '|'.join([ti[0] for ti in topics])
num_topics_command = [
'/bin/sh',
'-c',
f'kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list \
| sed -n -E "/^(theodolite-.*|input|output|configuration)\
| sed -n -E "/^({topics_delete})\
( - marked for deletion)?$/p" | wc -l'
]
......@@ -337,7 +339,7 @@ def delete_topics(topics):
'/bin/sh',
'-c',
f'kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete \
--topic "input|output|configuration|theodolite-.*"'
--topic "{topics_delete}"'
]
# Wait that topics get deleted
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment