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 90C1A200BD6 for ; Sat, 19 Nov 2016 10:54:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8E40B160B09; Sat, 19 Nov 2016 09:54:00 +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 D5B0B160AEF for ; Sat, 19 Nov 2016 10:53:59 +0100 (CET) Received: (qmail 7120 invoked by uid 500); 19 Nov 2016 09:53:58 -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 7095 invoked by uid 99); 19 Nov 2016 09:53:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Nov 2016 09:53:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7CE4C2C0D55 for ; Sat, 19 Nov 2016 09:53:58 +0000 (UTC) Date: Sat, 19 Nov 2016 09:53:58 +0000 (UTC) From: "Mykola Polonskyi (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-4270) ClassCast for Agregation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 19 Nov 2016 09:54:00 -0000 [ https://issues.apache.org/jira/browse/KAFKA-4270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15678967#comment-15678967 ] Mykola Polonskyi commented on KAFKA-4270: ----------------------------------------- Hello [~damianguy] I tried to do remappring with doAggragete. {code} cardId -> card(val userId, val cardId) {code} to {code} userId -> card(val userId, val cardId) {code} and then add adding to user(val userId, val setOfCards) card that was agregated. Looks like relation one-to-many I think. > ClassCast for Agregation > ------------------------ > > Key: KAFKA-4270 > URL: https://issues.apache.org/jira/browse/KAFKA-4270 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Mykola Polonskyi > Assignee: Damian Guy > Priority: Critical > Labels: architecture > > With defined serdes for intermediate topic in aggregation catch the ClassCastException: from custom class to the ByteArray. > In debug I saw that defined serde isn't used for creation sinkNode (incide `org.apache.kafka.streams.kstream.internals.KGroupedTableImpl#doAggregate`) > Instead defined serde inside aggregation call is used default Impl with empty plugs instead of implementations > {code:koltin} > userTable.join( > skicardsTable.groupBy { key, value -> KeyValue(value.skicardInfo.ownerId, value.skicardInfo) } > .aggregate( > { mutableSetOf() }, > { ownerId, skicardInfo, accumulator -> accumulator.put(skicardInfo) }, > { ownerId, skicardInfo, accumulator -> accumulator }, > skicardByOwnerIdSerde, > skicardByOwnerIdTopicName > ), > { userCreatedOrUpdated, skicardInfoSet -> UserWithSkicardsCreatedOrUpdated(userCreatedOrUpdated.user, skicardInfoSet) } > ).to( > userWithSkicardsTable > ) > {code} > I think current behavior of `doAggregate` with serdes and/or stores setting up should be changed because that is incorrect in release 0.10.0.1-cp1 to. -- This message was sent by Atlassian JIRA (v6.3.4#6332)