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 17DCC2009F3 for ; Sat, 4 Jun 2016 17:23:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 16787160A26; Sat, 4 Jun 2016 15:23:01 +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 5D002160A16 for ; Sat, 4 Jun 2016 17:23:00 +0200 (CEST) Received: (qmail 27384 invoked by uid 500); 4 Jun 2016 15:22:59 -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 27373 invoked by uid 99); 4 Jun 2016 15:22:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jun 2016 15:22:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 401062C1F5C for ; Sat, 4 Jun 2016 15:22:59 +0000 (UTC) Date: Sat, 4 Jun 2016 15:22:59 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-3561) Auto create through topic for KStream aggregation and join MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 04 Jun 2016 15:23:01 -0000 [ https://issues.apache.org/jira/browse/KAFKA-3561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15315545#comment-15315545 ] ASF GitHub Bot commented on KAFKA-3561: --------------------------------------- Github user dguy closed the pull request at: https://github.com/apache/kafka/pull/1453 > Auto create through topic for KStream aggregation and join > ---------------------------------------------------------- > > Key: KAFKA-3561 > URL: https://issues.apache.org/jira/browse/KAFKA-3561 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Guozhang Wang > Assignee: Damian Guy > Labels: api > Fix For: 0.10.1.0 > > > For KStream.join / aggregateByKey operations that requires the streams to be partitioned on the record key, today users should repartition themselves through the "through" call: > {code} > stream1 = builder.stream("topic1"); > stream2 = builder.stream("topic2"); > stream3 = stream1.map(/* set the right key for join*/).through("topic3"); > stream4 = stream2.map(/* set the right key for join*/).through("topic4"); > stream3.join(stream4, ..) > {code} > This pattern can actually be done by the Streams DSL itself instead of requiring users to specify themselves, i.e. users can just set the right key like (see KAFKA-3430) and then call join, which will be translated by adding the "internal topic for repartition". > Another thing is that today if user do not call "through" after setting a new key, the aggregation result would not be correct as the aggregation is based on key B while the source partitions is partitioned by key A and hence each task will only get a partial aggregation for all keys. But this is not validated in the DSL today. We should do both the auto-translation and validation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)