Jim, Currently, we don't have a tool to forcefully delete log files. If you want to clean the log files after a test run, assuming that no producers/consumers are running, you can simply delete the log directory. The next time a kafka server starts up, it will recreate the log directory. If you want to delete some log files while a Kafka server is running, assuming that there are no consumers running, you can delete all but the latest log segment for each partition and then restart the Kafka server. If you have consumers actively consuming data from older log segments, they will run into errors if you delete the log segments that the server was trying to serve messages from.
Thanks, Neha On Wed, Aug 8, 2012 at 9:03 AM, James A. Robinson <jim.robin...@stanford.edu> wrote: > Hi folks, > > I'm hunting around on the kafka site and haven't managed to figure out > whether or not there are tools to allow one to safely delete the > /tmp/kafka-logs files. Are there tools outside the retention policy? > > I'm running tests on a somewhat limited machine, and I'd like to > figure out a way to cleanly zero everything out after a test run. It > looks as though kafka is keeping a filehandle open for all the logs, > and it looks as though it's keeping track of offsets in zookeeper, so > I figure it isn't safe to simply delete the files! > > Jim > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > James A. Robinson jim.robin...@stanford.edu > Stanford University HighWire Press http://highwire.stanford.edu/ > +1 650 7237294 (Work) +1 650 7259335 (Fax)