Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
025aa8d6
Commit
025aa8d6
authored
4 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
Enhnace Kafka topic deletion
parent
7c4bc293
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
execution/run_uc1-new.sh
+5
-5
5 additions, 5 deletions
execution/run_uc1-new.sh
execution/run_uc2-new.sh
+8
-1
8 additions, 1 deletion
execution/run_uc2-new.sh
execution/run_uc3-new.sh
+9
-1
9 additions, 1 deletion
execution/run_uc3-new.sh
execution/run_uc4-new.sh
+9
-1
9 additions, 1 deletion
execution/run_uc4-new.sh
with
31 additions
and
8 deletions
execution/run_uc1-new.sh
+
5
−
5
View file @
025aa8d6
...
...
@@ -48,16 +48,16 @@ kubectl delete -f uc1-application/aggregation-deployment.yaml
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
echo
"Finished execution, print topics:"
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
'/^titan-.*
/p;/^input$/p;/^output$/p;/^configuration
$/p'
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
'/^titan-.*
/p;/^input$/p;/^output$/p;/^configuration
$/p'
|
wc
-l
)
-gt
0
#
kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n
-r
'/^
(
titan-.*
|input|output|configuration)( - marked for deletion)?
$/p'
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
-r
'/^
(
titan-.*
|input|output|configuration)( - marked for deletion)?
$/p'
|
wc
-l
)
-gt
0
do
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
echo
"Wait for topic deletion"
sleep
5s
echo
"Finished waiting, print topics:"
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
'/^titan-.*
/p;/^input$/p;/^output$/p;/^configuration
$/p'
#
echo "Finished waiting, print topics:"
#
kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n
-r
'/^
(
titan-.*
|input|output|configuration)( - marked for deletion)?
$/p'
# Sometimes a second deletion seems to be required
done
echo
"Finish topic deletion, print topics:"
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
'/^titan-.*
/p;/^input$/p;/^output$/p;/^configuration
$/p'
#
kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n
-r
'/^
(
titan-.*
|input|output|configuration)( - marked for deletion)?
$/p'
echo
"Exiting script"
This diff is collapsed.
Click to expand it.
execution/run_uc2-new.sh
+
8
−
1
View file @
025aa8d6
...
...
@@ -44,10 +44,17 @@ kubectl delete -f uc2-application/aggregation-deployment.yaml
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
'/^titan-.*/p;/^input$/p;/^output$/p;/^configuration$/p'
|
wc
-l
)
-gt
0
echo
"Finished execution, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
-r
'/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
|
wc
-l
)
-gt
0
do
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
echo
"Wait for topic deletion"
sleep
5s
#echo "Finished waiting, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
# Sometimes a second deletion seems to be required
done
echo
"Finish topic deletion, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
echo
"Exiting script"
This diff is collapsed.
Click to expand it.
execution/run_uc3-new.sh
+
9
−
1
View file @
025aa8d6
...
...
@@ -44,10 +44,18 @@ kubectl delete -f uc3-application/aggregation-deployment.yaml
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
'/^titan-.*/p;/^input$/p;/^output$/p;/^configuration$/p'
|
wc
-l
)
-gt
0
echo
"Finished execution, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
-r
'/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
|
wc
-l
)
-gt
0
do
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
echo
"Wait for topic deletion"
sleep
5s
#echo "Finished waiting, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
# Sometimes a second deletion seems to be required
done
echo
"Finish topic deletion, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
echo
"Exiting script"
This diff is collapsed.
Click to expand it.
execution/run_uc4-new.sh
+
9
−
1
View file @
025aa8d6
...
...
@@ -44,13 +44,21 @@ kubectl delete -f uc4-application/aggregation-deployment.yaml
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
'/^titan-.*/p;/^input$/p;/^output$/p;/^configuration$/p'
|
wc
-l
)
-gt
0
echo
"Finished execution, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
while
test
$(
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list"
|
sed
-n
-r
'/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
|
wc
-l
)
-gt
0
do
kubectl
exec
kafka-client
--
bash
-c
"kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
echo
"Wait for topic deletion"
sleep
5s
#echo "Finished waiting, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
# Sometimes a second deletion seems to be required
done
echo
"Finish topic deletion, print topics:"
#kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -r '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p'
echo
"Exiting script"
#TODO maybe delete schemas
#https://docs.confluent.io/current/schema-registry/schema-deletion-guidelines.html
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment