You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Tom Amon <ta...@gmail.com> on 2014/04/07 20:06:12 UTC

log retention question

I assume that "log.retention.hours" means the number of hours since the log
file was last modified, correct? Or is it since the log file was created?

If I set "log.retention.hours" to 48 hours does that mean that _any_ log
file older than 48 hours will be deleted or only log files that have
reached the maximum size ("log.segment.bytes") and are older than 48 hours
will be deleted?

In other words, will a log file that's actively being written to be deleted
after "log.retention.hours" has passed?

Re: log retention question

Posted by Guozhang Wang <wa...@gmail.com>.
Hi Tom,

The log files will be removed if it meets either the log.retention.hours or
the log.retention.bytes criterion. And the log.retention.hours is based on
the "last-time-modified" stamp, so the answer to your last question is no.

Guozhang


On Mon, Apr 7, 2014 at 11:06 AM, Tom Amon <ta...@gmail.com> wrote:

> I assume that "log.retention.hours" means the number of hours since the log
> file was last modified, correct? Or is it since the log file was created?
>
> If I set "log.retention.hours" to 48 hours does that mean that _any_ log
> file older than 48 hours will be deleted or only log files that have
> reached the maximum size ("log.segment.bytes") and are older than 48 hours
> will be deleted?
>
> In other words, will a log file that's actively being written to be deleted
> after "log.retention.hours" has passed?
>



-- 
-- Guozhang