Reputation: 540
just in case we delete the wrong topic as
/usr/hdp/current/kafka-broker/bin/kafka-topics.sh --zookeeper hdpmaster01:2181 --delete --topic gtom.poli.pri.proc
Topic gtom.poli.pri.proc is already marked for deletion
Topic gtom.poli.pri.procis already marked for deletion and now we want to revert it
what are the steps to revert topic deletion?
all folders topics as the following are still exists under
/var/kafka/kafka-logs
gtom.poli.pri.procis-23
gtom.poli.pri.procis-45
gtom.poli.pri.procis-34
.
.
.
Upvotes: 1
Views: 554
Reputation: 26885
You can abort the deletion by running the following command in zookeeper:
rmr /admin/delete_topics/gtom.poli.pri.procis
Note that this will only prevent the deletion to proceed if it has not already started. If anything has already been deleted, it's gone
Upvotes: 1