Hi Tom,

the KIP-170 doesn't propose to use a TopicDeletePolicy as policy classes are 
meant to be.

It's referring to the authorization interface 
(KIP-11<https://cwiki.apache.org/confluence/display/KAFKA/KIP-11+-+Authorization+Interface>)
 with operation = DELETE and resource = TOPIC.

You know that when a request comes in there is the "authorizer" first which is 
based on KIP-11 and then the operation is called and then you could have policy.

I.e. for create topics, first the "authorizer" is called in the KafkaApis 
(operation = CREATE, resource = TOPIC) and then the CreateTopicPolicy is 
applied in the AdminManager.


In any case what KIP-170 is proposing is not good. Maybe we could have 
operation = DELETE and a new resource = MESSAGE/RECORD.

What could be useful use cases for having a RecordsDeletePolicy ? Records can't 
be deleted for a topic name ? Starting from a specific offset ?


Paolo Patierno
Senior Software Engineer (IoT) @ Red Hat
Microsoft MVP on Azure & IoT
Microsoft Azure Advisor

Twitter : @ppatierno<http://twitter.com/ppatierno>
Linkedin : paolopatierno<http://it.linkedin.com/in/paolopatierno>
Blog : DevExperience<http://paolopatierno.wordpress.com/>


________________________________
From: Tom Bentley <t.j.bent...@gmail.com>
Sent: Tuesday, September 19, 2017 8:55 AM
To: dev@kafka.apache.org
Subject: Re: [DISCUSS] KIP-204 : adding records deletion operation to the new 
Admin Client API

Hi Paolo,

Thanks for the KIP.

What errors can be anticipated for the API method (See
https://issues.apache.org/jira/browse/KAFKA-5445)?

It's not mentioned in KIP-107, but maybe now is a good time to consider
whether there should be some kind of DeleteRecordsPolicy, like there is for
creating topics? Note: KIP-170 proposes a TopicDeletePolicy, but I don't
think you could use that as currently proposed, because it would be unable
to distinguish the deletion of an entire topic from the deletion of some
records within a topic.

Thanks again,

Tom


On 18 September 2017 at 21:06, Dong Lin <lindon...@gmail.com> wrote:

> +1 (non-binding)
>
> On Mon, Sep 18, 2017 at 1:04 PM, Ted Yu <yuzhih...@gmail.com> wrote:
>
> > +1
> >
> > On Mon, Sep 18, 2017 at 9:19 AM, Paolo Patierno <ppatie...@live.com>
> > wrote:
> >
> > > Hi devs,
> > >
> > >
> > > I'd like to start a discussion around adding the delete records
> > operation,
> > > already available at protocol level and in the "legacy" Admin Client in
> > > Scala, to the "new" Admin Client API in Java.
> > >
> > >
> > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> > > 204+%3A+adding+records+deletion+operation+to+the+new+Admin+Client+API
> > >
> > >
> > > Thanks,
> > >
> > >
> > > Paolo Patierno
> > > Senior Software Engineer (IoT) @ Red Hat
> > > Microsoft MVP on Azure & IoT
> > > Microsoft Azure Advisor
> > >
> > > Twitter : @ppatierno<http://twitter.com/ppatierno>
> > > Linkedin : paolopatierno<http://it.linkedin.com/in/paolopatierno>
> > > Blog : DevExperience<http://paolopatierno.wordpress.com/>
> > >
> >
>

Reply via email to