Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0C254200CD7 for ; Tue, 1 Aug 2017 18:53:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 08DAD167870; Tue, 1 Aug 2017 16:53:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F3B2516786D for ; Tue, 1 Aug 2017 18:53:35 +0200 (CEST) Received: (qmail 53257 invoked by uid 500); 1 Aug 2017 16:53:29 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 53244 invoked by uid 99); 1 Aug 2017 16:53:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2017 16:53:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 5A410C0221 for ; Tue, 1 Aug 2017 16:53:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.198 X-Spam-Level: X-Spam-Status: No, score=0.198 tagged_above=-999 required=6.31 tests=[FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 3sRgA20Oo4RP for ; Tue, 1 Aug 2017 16:53:24 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064010.outbound.protection.outlook.com [40.92.64.10]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id CD1FB5F3CC for ; Tue, 1 Aug 2017 16:53:23 +0000 (UTC) Received: from HE1EUR01FT021.eop-EUR01.prod.protection.outlook.com (10.152.0.59) by HE1EUR01HT045.eop-EUR01.prod.protection.outlook.com (10.152.1.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1240.9; Tue, 1 Aug 2017 16:53:16 +0000 Received: from HE1PR0202MB2906.eurprd02.prod.outlook.com (10.152.0.58) by HE1EUR01FT021.mail.protection.outlook.com (10.152.0.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.16 via Frontend Transport; Tue, 1 Aug 2017 16:53:16 +0000 Received: from HE1PR0202MB2906.eurprd02.prod.outlook.com ([fe80::790e:b5c9:87d7:1de1]) by HE1PR0202MB2906.eurprd02.prod.outlook.com ([fe80::790e:b5c9:87d7:1de1%17]) with mapi id 15.01.1282.023; Tue, 1 Aug 2017 16:53:16 +0000 From: Paolo Patierno To: "dev@kafka.apache.org" Subject: Re: Command tools : from Scala to Java, from Zookeeper utils to Admin Client API Thread-Topic: Command tools : from Scala to Java, from Zookeeper utils to Admin Client API Thread-Index: AQHTB4hSOBa/stpXXU6eH/aAG+Q5AqJpC7aAgAaJ+VSAAAklgIAAEmC7gAALEQCAAACt2w== Date: Tue, 1 Aug 2017 16:53:16 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:FC75B704A3589C6A75E4737B8186368E96938DAC67F2F30823252B36C2A471C6;UpperCasedChecksum:49B54AEBAD196142C0A0B36BD7EE9481F03FD84619C2137BEBEBDD6B9C3CB3A4;SizeAsReceived:7726;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [UM75pq8E1bef4xECF73gCkdgXFDXQKcQ] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HE1EUR01HT045;7:l3AeenN0f2kOFB5sauqqfV3k6PYjcPFsocfWjOXxPnDIsZeF9+I4hLbilJLbTizdoL6UYZI2c1YVMFU60klA3WlXLctNmy3SO6fOhGa1rizYtKLr0SD0M+wLrycOTEv12NpPPw5w5AHKhvES2sgYCC8kKIOVHRkE2sfbnLMMWd3xIzTF5ziiFIv9I6nC1qYsQqJZtVHqWz1WUwIA1c2x/Wy+iLSBiS9Oviuz16+N/OXSSY9aJHqnF0LdZ9Ibv+iaEKL4s0PY35hmQXTOFh3ghgKVJIKzIGvSy9d875vkD11w7wBYaldNyhgfDhdBR3ZQduRujgBslwsQI8H8yjNOl5NOgNJ18asJFNNUSv+murc2TKSgAXslgL10sKghgfvTlsVoVjx+tsQ0D4CWnXcOI78mA3MMJoFPkBmVbnontoeWPIKFqW03XXTHc/cvnLbFeDCF6vp48Yx4uvhB+5MreFIFGpSYE+1HU9ufyAAH10lCw6v2c91EKeNzGoaeAxN1k+5TQdLW+VIZxHomOYBVv17jgXxWypXJ/ZLsgVAqE70yXdix6bposWNrYxeiFhqWX0Nekm7Ni2yuN2RprytN0ga6iPXixPzvOp4h31jswT775tUENZcDgWfs2Mg8FmnpirCfc+sE9qQbSMKbZrvNugwAqsTEQl6kTybpxd6V/0dG7klMbONdbsCslvGzigBvXNOSqxQTJjQ3162ez5zbsmzc47yrR+R2GJzchfeXC1+Q1ymcLOuB055fijWIK7n1bDdFTHBydFknRijJtIhGCQ== x-incomingheadercount: 45 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(7070007)(98901004);DIR:OUT;SFP:1901;SCL:1;SRVR:HE1EUR01HT045;H:HE1PR0202MB2906.eurprd02.prod.outlook.com;FPR:;SPF:None;LANG:en; x-ms-office365-filtering-correlation-id: 39092a3c-22cd-4041-160d-08d4d8fdce52 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322377)(1601125374)(1603101448)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:HE1EUR01HT045; x-ms-traffictypediagnostic: HE1EUR01HT045: x-exchange-antispam-report-test: UriScan:(148322886591682)(31418570063057)(47647156867600)(37052965297144)(116415991822766)(788757137089)(81160342030619)(105182351903845); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031);SRVR:HE1EUR01HT045;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:HE1EUR01HT045; x-forefront-prvs: 0386B406AA spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_HE1PR0202MB2906D7EC0BA266604B2E46E0C9B30HE1PR0202MB2906_" MIME-Version: 1.0 X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2017 16:53:16.4472 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT045 archived-at: Tue, 01 Aug 2017 16:53:37 -0000 --_000_HE1PR0202MB2906D7EC0BA266604B2E46E0C9B30HE1PR0202MB2906_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Ismael, in this case I embrace your way :-) To be more specific on what I was doing, It means that I can continue to de= velop the TopicCommand tool in Java using AdminClient API and then adding t= he deprecation for --zookeeper and the "tool switch" in the shell script. I= t doesn't need a KIP, does it ? For the future --zookeeper removal, a KIP would be needed and I'll write th= at. Because it's something common to more tools, does it make sense to have= only one KIP or writing a KIP for each effected tool ? I guess the second = option because each KIP will have effect on a specific version (tools migra= tion will be done over more releases). Is that right ? Thanks, Paolo Patierno Senior Software Engineer (IoT) @ Red Hat Microsoft MVP on Windows Embedded & IoT Microsoft Azure Advisor Twitter : @ppatierno Linkedin : paolopatierno Blog : DevExperience ________________________________ From: ismaelj@gmail.com on behalf of Ismael Juma Sent: Tuesday, August 1, 2017 4:46 PM To: dev@kafka.apache.org Subject: Re: Command tools : from Scala to Java, from Zookeeper utils to Ad= min Client API Hi Paolo, If the old tool is deprecated, then it's OK to add functionality to the new tool without adding it to the old tool as long as the old tool still works. So, there is some maintenance overhead to keep it working (but not to add new features). In practice, the code used by the old tool is shared with the broker so the maintenance overhead should be small. Ismael On Tue, Aug 1, 2017 at 5:12 PM, Paolo Patierno wrote: > Hi Ismael, > > > your third option is really appealing for me :-) > > > Just one thought about that ... > > If we decide to go in this way we could have an 1.0 release with both > Scala (zookeeper) and Java (bootstrap-server) implementations but then th= e > shell script to chose one of them with the --zookeeper deprecation. > > The final Scala (zookeeper) removal will happen on version 2.0 (following > the policies about "major.minor.patch" release) but it could be months an= d > months later. > > In the meantime, let's suppose that we want to add a new --foo option to > the tool; we should do that on both implementations having them in sync a= nd > it could be a problem until on 2.0 release when we get rid of the Scala > implementation. > > I really like your way but it could be better if we agree that new comman= d > options will be added only to the Java (bootstrap-server) implementation. > It could mean pushing users to move from old to new tool ... that is good > for us. > > > What do you think ? > > > Thanks, > > > Paolo Patierno > Senior Software Engineer (IoT) @ Red Hat > Microsoft MVP on Windows Embedded & IoT > Microsoft Azure Advisor > > Twitter : @ppatierno > Linkedin : paolopatierno > Blog : DevExperience > > > ________________________________ > From: ismaelj@gmail.com on behalf of Ismael Juma < > ismael@juma.me.uk> > Sent: Tuesday, August 1, 2017 3:00 PM > To: dev@kafka.apache.org > Subject: Re: Command tools : from Scala to Java, from Zookeeper utils to > Admin Client API > > Hi Paolo, > > Another option is to write the new tool in Java without support for > `--zookeeper` and include some logic in the shell script to pick the > implementation based on the presence of `--bootstrap-server` or > `--zookeeper`. This would mean that we can deprecate the Scala tool while > still supporting it for existing users. > > I think this would involve the least amount of rewriting once we drop > support for `--zookeeper`. > > Thoughts? > > Ismael > > On Tue, Aug 1, 2017 at 3:30 PM, Paolo Patierno wrote= : > > > Hi Tom, > > > > > > thanks for your reply. I think that you are right and what you have > > proposed should be the way to go. > > > > > > Until today I have been working on refactoring the TopicCommand tool in > > Java using the AdminClient getting rid of the Zookeeper usage in only > "one > > step" and maybe it's wrong. > > > > I'd like to have some input from committers as well to be sure that the > > way is good about how handling such use cases. > > > > > > Thanks, > > > > > > Paolo Patierno > > Senior Software Engineer (IoT) @ Red Hat > > Microsoft MVP on Windows Embedded & IoT > > Microsoft Azure Advisor > > > > Twitter : @ppatierno > > Linkedin : paolopatierno > > Blog : DevExperience > > > > > > ________________________________ > > From: Tom Bentley > > Sent: Friday, July 28, 2017 10:36 AM > > To: dev@kafka.apache.org > > Subject: Re: Command tools : from Scala to Java, from Zookeeper utils t= o > > Admin Client API > > > > Hi Paolo, > > > > Replies in line... > > > > On 28 July 2017 at 11:14, Paolo Patierno wrote: > > > > > Hi committers, > > > > > > in my understanding there is the common idea to move all tools from > Scala > > > to Java and then using the new Admin Client API instead of using the > > > Zookeeper connection. > > > > > > Regarding this subject I started to work on refactoring the > TopicCommand > > > tool but with two steps at same time : > > > > > > > > > * re-writing it in Java > > > * removing --zookeeper option (so no Zookeeper connection) and > adding > > > --broker-list option (so using the Admin Client API) > > > > > > Of course, such option substitution is a breaking change for the tool > > (and > > > the users who are using it). > > > In such a scenario, the two steps path should be needed : first > > > deprecation, then removal (for the --zookeeper option) > > > > > > > A change to tools (and their options) requires a KIP. There's no > > fundamental reason why both couldn't be supported during a transition > > period. So I doubt a KIP that didn't propose a transition period would > get > > passed. > > > > > > It seems that in the "deprecation" phase we have two possible solutions= : > > > > > > > > > 1. Adding Admin Client API to the Scala tools and so the > --broker-list > > > option and a warning on --zookeeper for deprecation > > > 2. Rewriting the tool in Java using the Admin Client API (so > > > --broker-list) but at same time providing --zookeeper as well (so > > Zookeeper > > > connection) > > > > > > With the solution 2) we have the advantage to have the tool already i= n > > > Java when the --zookeeper option will be removed in a next step. In a= ny > > > case we have to write the part related to use the Admin Client API so > it > > > make more sense to me option 2) porting the Zookeeper needed code fro= m > > > Scala to Java (then removing it in the next phase). > > > > > > Is my understanding right on how we have to handle deprecation and > > removal > > > for something that is a breaking change ? > > > Or this case is something "special" and we can live with a new Java > based > > > tool without zookeeper but with Admin Client API at same time ? > > > > > > Of course having both Admin Client API and Zookeeper utils working at > the > > > same time in the tools means more complexity in the code but it's > > something > > > that could be factorized. > > > > > > > I think the right thing to do would be: > > > > 1. deprecate the old option, adding support for the replacement option > > (using the AdminClient). Keep the code in scala. All this is in one KIP= . > > 2. Remove the old option (needs a KIP) > > 3. Rewrite the tool in Java. > > > > Parts 2 and 3 could be done at the same time. I don't believe part 3 > needs > > a KIP if it were a drop-in replacement. > > > > The reason I think this is the right way to proceed is: > > > > * It gives users a transition period to learn about the new option, and > > replace any tooling of their own. > > * By keeping the tool in scala you get to release your new AdminClient > API > > and get to iron out all the creases while users still have the > --zookeeper > > option as a fallback. > > * Then when you know the AdminClient API works in the field you have a > > straight porting job to do, and you have less code to port because you > > don't have to port the code to support --zookeeper. > > > > But I'm fairly new here, so maybe a committer will chime in an correct = me > > where I'm wrong! > > > > Cheers, > > > > Tom > > > --_000_HE1PR0202MB2906D7EC0BA266604B2E46E0C9B30HE1PR0202MB2906_--