Alternatively you can set topic overrides for retention.bytes.  By turning
back file.delete.delay.ms that change should be nearly instant after the
next log cleanup cycle.

# Apply topic config override
$ kafka-configs --alter --entity-type topics --entity-name test --zookeeper
localhost:32181 --add-config file.delete.delay.ms=0,retention.bytes=0
      Completed Updating config for entity: topic 'test'.

# Remove topic config overrides
$ kafka-configs --alter --entity-type topics --entity-name test --zookeeper
localhost:32181 --delete-config file.delete.delay.ms,retention.bytes
Completed Updating config for entity: topic 'test'.


On Fri, Aug 18, 2017 at 1:32 PM, Manikumar <manikumar.re...@gmail.com>
wrote:

> This feature got released in Kafka 0.11.0.0. You can
> use kafka-delete-records.sh script to delete data.
>
> On Sun, Aug 13, 2017 at 11:27 PM, Hans Jespersen <h...@confluent.io>
> wrote:
>
> > This is an area that is being worked on. See KIP-107 for details.
> >
> > https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> > 107%3A+Add+purgeDataBefore%28%29+API+in+AdminClient <
> > https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> > 107:+Add+purgeDataBefore()+API+in+AdminClient>
> >
> > -hans
> >
> >
> > > On Aug 10, 2017, at 10:52 AM, Sven Ludwig <s_lud...@gmx.de> wrote:
> > >
> > > Hello,
> > >
> > > assume that all producers and consumers regarding a topic-partition
> have
> > been shutdown.
> > >
> > > Is it possible in this situation to empty that topic-partition, while
> > the other topic-partitions keep working?
> > >
> > > Like for example, is it possible to trigger a log truncation to 0 on
> the
> > leader for that partition using some admin tool?
> > >
> > > Kind Regards,
> > > Sven
> > >
> >
> >
>



-- 
Senior Software Engineer, Lightbend, Inc.

<http://lightbend.com>

@seg1o <https://twitter.com/seg1o>

Reply via email to