Support Questions

Find answers, ask questions, and share your expertise

how to revert topic deletion

avatar

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.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

.

.

Michael-Bronson
1 ACCEPTED SOLUTION

avatar

Wק 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

Michael-Bronson

View solution in original post

1 REPLY 1

avatar

Wק 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

Michael-Bronson