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 D0AB6200D3B for ; Fri, 10 Nov 2017 12:12:58 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CF17A160BF2; Fri, 10 Nov 2017 11:12:58 +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 ED9FC160BEE for ; Fri, 10 Nov 2017 12:12:57 +0100 (CET) Received: (qmail 53515 invoked by uid 500); 10 Nov 2017 11:12:56 -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 53503 invoked by uid 99); 10 Nov 2017 11:12:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2017 11:12:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AB247C2BBB for ; Fri, 10 Nov 2017 11:12:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.979 X-Spam-Level: * X-Spam-Status: No, score=1.979 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=confluent-io.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id MVnFHBND33Iw for ; Fri, 10 Nov 2017 11:12:53 +0000 (UTC) Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4382F5F3DE for ; Fri, 10 Nov 2017 11:12:53 +0000 (UTC) Received: by mail-qk0-f174.google.com with SMTP id p19so6234394qke.2 for ; Fri, 10 Nov 2017 03:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=confluent-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=qm3V2toB4Poa5n0Vu0gB2CEWgQSPRQW/0YZYhcdh2Xg=; b=OI9wWQoYUAR8H5p6WXwnXwAgnH/srDPjmR/QCEiy3ovCpZBY0hD4Oygj5R6YD4ZQ5+ wzCRzFxlNGPylZ8SMeJzqxle45yHu8KwFkmqG8qlsEzx+EwIrww+/IcobDF63tChcUzR 7viuToSQ+0Eau99LFxro/LwIzObBXOyRYqRqJSuSGPwPlVRZFV0ucIisCjdR8HVFIIlF pRiqlpHdwxgvCxa85BaORg5VerWRBRC55p3doQP7Lho9VB93eE2Gq3aIcGdWC2dqf+vL D3cgNgSEgBirUfBCfDMBqDQv+P2JzEQcWZ0h2NctXq2SqgNT062Fz6ban5Cnn2Sf2ICA 8ugA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=qm3V2toB4Poa5n0Vu0gB2CEWgQSPRQW/0YZYhcdh2Xg=; b=eic71Anb9vDR17/rlRdJA1zUl3zIbUqJLPRK0zVX492hNrOCM4Ny1xlwujJ75CzFNo 29FqcYGrllVjR6cYeTivaZKjq8FQHtudJHuzVZ5OvGPcoGQTSOnxB2Fnk0f1ppT1UL7Z qIORLL4lTmo0io3FIxtXGmfsrYMjff7lMqSnVy2O+U9W2POLAaem0J8fjAyg/T/O4xme asg1/4Lz64MTGyly49Fh494umjHMuv3bC8ebUderBTfvjZUlzIRrPueFWmNUmjcd8yIF MIF1LNjQPbzndAi17BAyawa3AdUxxqudxE76nyWyGHE0JaSxdk/60tWhQUXeEIwVYnaM VB9w== X-Gm-Message-State: AJaThX5trt3gl8zzyS6hTwF7ptfDQ5itQWRhFnLmJ2DU2heMrB6ZgZVK IKMNFpKgDSnMTKg/bNN5o3ofRq6fF5pHy3z1lkppMw== X-Google-Smtp-Source: AGs4zMYDh1NRnLukpDAnwg9iX62dFo4Bf5nQoW2RBlGXP5HY1zi1+od858HWgCkn2RxPs7RIJWkVYhKDnnrMS3RBz8k= X-Received: by 10.55.131.135 with SMTP id f129mr5723552qkd.318.1510312367066; Fri, 10 Nov 2017 03:12:47 -0800 (PST) MIME-Version: 1.0 References: <1509995885.2977722.1163515256.51D49E8A@webmail.messagingengine.com> In-Reply-To: <1509995885.2977722.1163515256.51D49E8A@webmail.messagingengine.com> From: Ben Stopford Date: Fri, 10 Nov 2017 11:12:36 +0000 Message-ID: Subject: Re: [DISCUSS] KIP-218: Make KafkaFuture.Function java 8 lambda compatible To: dev@kafka.apache.org Content-Type: multipart/alternative; boundary="94eb2c06f74023ae3a055d9f008c" archived-at: Fri, 10 Nov 2017 11:12:59 -0000 --94eb2c06f74023ae3a055d9f008c Content-Type: text/plain; charset="UTF-8" Sounds like a good middle ground to me. What do you think Steven? On Mon, Nov 6, 2017 at 8:18 PM Colin McCabe wrote: > It would definitely be nice to use the jdk8 CompletableFuture. I think > that's a bit of a separate discussion, though, since it has such heavy > compatibility implications. > > How about making KIP-218 backwards compatible? As a starting point, you > can change KafkaFuture#BiConsumer to an interface with no compatibility > implications, since there are currently no public functions exposed that > use it. That leaves KafkaFuture#Function, which is publicly used now. > > For the purposes of KIP-218, how about adding a new interface > FunctionInterface? Then you can add a function like this: > > > public abstract KafkaFuture thenApply(FunctionInterface > function); > > And mark the older declaration as deprecated: > > > @deprecated > > public abstract KafkaFuture thenApply(Function function); > > This is a 100% compatible way to make things nicer for java 8. > > cheers, > Colin > > > On Thu, Nov 2, 2017, at 10:38, Steven Aerts wrote: > > Hi Tom, > > > > Nice observation. > > I changed "Rejected Alternatives" section to "Other Alternatives", as > > I see myself as too much of an outsider to the kafka community to be > > able to decide without this discussion. > > > > I see two major factors to decide: > > - how soon will KIP-118 (drop support of java 7) be implemented? > > - for which reasons do we drop backwards compatibility for public > > interfaces marked as Evolving > > > > If KIP-118 which is scheduled for version 2.0.0 is going to be > > implemented soon, I agree with you that replacing KafkaFuture with > > CompletableFuture (or CompletionStage) is a preferable option. > > But as I am not familiar with the roadmap it is difficult to tell for me. > > > > > > Thanks, > > > > > > Steven > > > > > > 2017-11-02 11:27 GMT+01:00 Tom Bentley : > > > Hi Steven, > > > > > > I notice you've renamed the template's "Rejected Alternatives" section > to > > > "Other Alternatives", suggesting they're not rejected yet (or, if you > have > > > rejected them, I think you should give your reasons). > > > > > > Personally, I'd like to understand the arguments against simply > replacing > > > KafkaFuture with CompletableFuture in Kafka 2.0. In other words, if we > were > > > starting without needing to support Java 7 what would be the arguments > for > > > having our own KafkaFuture? > > > > > > Thanks, > > > > > > Tom > > > > > > On 1 November 2017 at 16:01, Ted Yu wrote: > > > > > >> KAFKA-4423 is still open. > > >> When would Java 7 be dropped ? > > >> > > >> Thanks > > >> > > >> On Wed, Nov 1, 2017 at 8:56 AM, Ismael Juma > wrote: > > >> > > >> > On Wed, Nov 1, 2017 at 3:51 PM, Ted Yu wrote: > > >> > > > >> > > bq. Wait for a kafka release which will not support java 7 anymore > > >> > > > > >> > > Do you want to raise a separate thread for the above ? > > >> > > > > >> > > > >> > There is already a KIP for this so a separate thread is not needed. > > >> > > > >> > Ismael > > >> > > > >> > --94eb2c06f74023ae3a055d9f008c--