You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by YuanJia Li <yu...@163.com> on 2015/01/22 09:40:01 UTC

delete log file

Hi all,
The kafka broker's disk is almost full, and the log file is still opened by kafka through lsof command.
I know to change log.retention.hours in server.properties, but I don't want to restart the kafka server.
Is there any utility to delete log file without impacting kafka?

Thanks & Regards
YuanJia Li

Re: Re: delete log file

Posted by YuanJia Li <yu...@163.com>.
Hi Yang,
I think my problem is not the same with yours.
My production environment is fine, log.retention.hours is 720. My disk is almost full just beacause of too much data.
I want to have a utility or command to delete manually, instead of waiting until it expires.
Thanks for your reply.



Thanks & Regards
YuanJia Li

From: Yang Fang
Date: 2015-01-23 12:15
To: users
Subject: Re: delete log file
YuanJia,
I want to know why your broker's disk is almost full . Maybe your issue is
the same with mine. Is it one broker out of service for a long time, then
it fails back,  at first it looks good, but after some hours, its disk is
almost full. Other brokers are all fine, avg remaining capacity is about
25%. In my production environment, log.retention.hours is 24, broker's data
volume is about 2TB. The reason it that when broker decide to delete logs
is based on its start time and log.retention.hours.

On Thu, Jan 22, 2015 at 4:40 PM, YuanJia Li <yu...@163.com> wrote:

> Hi all,
> The kafka broker's disk is almost full, and the log file is still opened
> by kafka through lsof command.
> I know to change log.retention.hours in server.properties, but I don't
> want to restart the kafka server.
> Is there any utility to delete log file without impacting kafka?
>
> Thanks & Regards
> YuanJia Li

Re: delete log file

Posted by Yang Fang <fr...@gmail.com>.
YuanJia,
I want to know why your broker's disk is almost full . Maybe your issue is
the same with mine. Is it one broker out of service for a long time, then
it fails back,  at first it looks good, but after some hours, its disk is
almost full. Other brokers are all fine, avg remaining capacity is about
25%. In my production environment, log.retention.hours is 24, broker's data
volume is about 2TB. The reason it that when broker decide to delete logs
is based on its start time and log.retention.hours.

On Thu, Jan 22, 2015 at 4:40 PM, YuanJia Li <yu...@163.com> wrote:

> Hi all,
> The kafka broker's disk is almost full, and the log file is still opened
> by kafka through lsof command.
> I know to change log.retention.hours in server.properties, but I don't
> want to restart the kafka server.
> Is there any utility to delete log file without impacting kafka?
>
> Thanks & Regards
> YuanJia Li

Re: delete log file

Posted by Jun Rao <ju...@confluent.io>.
In general, you shouldn't delete any files while the broker is up. If you
have no other choices, you can try deleting the older log segments and hope
that no consumer or the log cleaner are using them.

Thanks,

Jun

On Thu, Jan 22, 2015 at 12:40 AM, YuanJia Li <yu...@163.com> wrote:

> Hi all,
> The kafka broker's disk is almost full, and the log file is still opened
> by kafka through lsof command.
> I know to change log.retention.hours in server.properties, but I don't
> want to restart the kafka server.
> Is there any utility to delete log file without impacting kafka?
>
> Thanks & Regards
> YuanJia Li