Hi Edoardo, Do you intend to update the KIP to avoid the introduction of another interface?
Ismael On Fri, Jun 23, 2017 at 5:47 PM, Edoardo Comar <eco...@uk.ibm.com> wrote: > Thanks for the thoughts Ismael > > > 1. Have you considered extending RequestMetadata with the additional > > information you need? We could add Cluster to it, which has topic > > assignment information, for example. This way, there would be no need > for a > > V2 interface. > > 1. I hadn't thought of it - but this seems a feasible alternative. > > The XXXPolicy.RequestMetadata could be enriched to include more > information - > for backward compatibility with existing Policies we would only add > methods to these classes. > > Presumably the number of Admin Request is not huge so we should not be too > worried > about the overhead of populating a org.apache.kafka.common.Cluster for > every admin request , right ? > > The only feature I can't see how to easily support with the enriched > XXXPolicy.RequestMetadata is how to check > for a topic being marked for deletion using the Cluster information > > This check is useful for us in excluding such outliers when counting the > number of partitions. > > > > 2. Something else that could be useful is passing an instance of > `Session` > > so that one can provide custom behaviour depending on the logged in > user. > > Would this be useful? > 2. Definitely I would expect that a general solution includes the Session > or the KafkaPrincipal associated with it > (the latter may be a simpler dependency for the XXXPolicy.RequestMetadata > > > > 3. For the delete case, we may consider passing a class instead of just > a > > string to the validate method so that we have options if we need to > extend > > it. > > 3. Agree, we should have the DeletePolicy define its RequestMetadata > class, too > > > > 4. Do we want to enhance the AlterConfigs policy as well? > > 4. I don't see why not :-) > > > > thanks > Edo > -------------------------------------------------- > > Edoardo Comar > > IBM Message Hub > > > isma...@gmail.com wrote on 22/06/2017 15:05:06: > > > From: Ismael Juma <ism...@juma.me.uk> > > To: dev@kafka.apache.org > > Date: 22/06/2017 15:05 > > Subject: Re: [DISCUSS] KIP-170: Enhanced TopicCreatePolicy and > > introduction of TopicDeletePolicy > > Sent by: isma...@gmail.com > > > > Thanks for the KIP, Edoardo. A few comments: > > > > > > > > > > > > > > > > Ismael > > > > On Thu, Jun 22, 2017 at 2:41 PM, Edoardo Comar <eco...@uk.ibm.com> > wrote: > > > > > Hi all, > > > > > > We've drafted "KIP-170: Enhanced TopicCreatePolicy and introduction of > > > TopicDeletePolicy" for discussion: > > > > > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-170%3A+Enhanced+ > > > TopicCreatePolicy+and+introduction+of+TopicDeletePolicy > > > > > > Please take a look. Your feedback is welcome and much needed. > > > > > > Thanks, > > > Edoardo > > > -------------------------------------------------- > > > Edoardo Comar > > > IBM Message Hub > > > eco...@uk.ibm.com > > > IBM UK Ltd, Hursley Park, SO21 2JN > > > Unless stated otherwise above: > > > IBM United Kingdom Limited - Registered in England and Wales with > number > > > 741598. > > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 > 3AU > > > > > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU >