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 27489200B71 for ; Wed, 17 Aug 2016 03:22:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 244C2160ABA; Wed, 17 Aug 2016 01:22:38 +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 4A259160AA8 for ; Wed, 17 Aug 2016 03:22:37 +0200 (CEST) Received: (qmail 78052 invoked by uid 500); 17 Aug 2016 01:22:36 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 78042 invoked by uid 99); 17 Aug 2016 01:22:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2016 01:22:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EE8A618580E for ; Wed, 17 Aug 2016 01:22:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=mz.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id zGzOzGazulP4 for ; Wed, 17 Aug 2016 01:22:34 +0000 (UTC) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 23BFA5FBD0 for ; Wed, 17 Aug 2016 01:22:34 +0000 (UTC) Received: by mail-io0-f176.google.com with SMTP id q83so123864714iod.1 for ; Tue, 16 Aug 2016 18:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mz.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=roeloa52FOHOB4MO0XGPKPI7i5FlE7zpuWjH4wJ3xag=; b=PPfHqZqjxc4m+G4A1u6pyRixRQggLRNaoU89MURzcT7ZU3AOo9YQjXlnm5vIzTPhTC y6eW0kgzI801WBrUJe7td5xjiNdWwgzDLAXLDYsmoaKFthbcfrEhbXuVy7IGp7o43oWp 6zGhwvinoUB1ZIMitEidb4RybYdZFQn0MobUw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=roeloa52FOHOB4MO0XGPKPI7i5FlE7zpuWjH4wJ3xag=; b=K/0iMpnEg+X1THfd9WiqzKGM9rZmV32fSReBlrtRU4m2Q8fBdzyQBTO8uaZCZxn7+p kjjEosBqp9z5uhcWJ1klYbO4p+xCkRhFEXPXhjaIxiJwATbSseMEP7veTu0KAVbaAPzJ Uf2ot8dhglcR8X+T/1YukDkUq+xdHS+36BjLW2bd5TE7+x/AddW0K38R2r5P/8IkxwMs S4Jizkq7d76QnQZyuUPhN6B+tVGH8BqNWF/tk/6c1PRrLIRnyF99vg4wq0bgBNYtZTBs iyCYjZcsRBmhjG5IljaTTYvA0qIih1asIfrxAie5t8Nq0x1+plesStjxe6V3FLUZiOwn Lwqg== X-Gm-Message-State: AEkoouvO5YSCTiLudzfvF996/WDZna+YdluXE2A2r500VD+Tir2UZpivfkCYsuuiyf3ndtJBIhHonr05IKBCPFE5 X-Received: by 10.107.9.39 with SMTP id j39mr43229980ioi.73.1471396952823; Tue, 16 Aug 2016 18:22:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.134.142 with HTTP; Tue, 16 Aug 2016 18:21:52 -0700 (PDT) From: Jack Huang Date: Tue, 16 Aug 2016 18:21:52 -0700 Message-ID: Subject: Cannot use WindowedStream.fold with EventTimeSessionWindows To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a113fb786b29b03053a3a4c13 archived-at: Wed, 17 Aug 2016 01:22:38 -0000 --001a113fb786b29b03053a3a4c13 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, I want to window a series of events using SessionWindow and use fold function to incrementally aggregate the result. events .keyBy(_.id) .window(EventTimeSessionWindows.withGap(Time.minutes(1))) .fold(new Session)(eventFolder) =E2=80=8B However I get java.lang.UnsupportedOperationException: Fold cannot be used with a merging WindowAssigner. =E2=80=8B Does anyone have a workaround? Thanks, Jack --001a113fb786b29b03053a3a4c13 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I want to window a series of ev= ents using SessionWindow and use fold function to incrementally aggregate t= he result.
events
    .keyBy(_.id)
    .window(EventTimeSessionWindows.withGap(Time.minutes(1)))
    .fold(new Session)(eventFolder)
=E2=80=8B
However= I get
java.lang.UnsupportedOperationExcep=
tion: Fold cannot be used with a merging WindowAssigner.
=E2=80=8B

Does anyone have a workaround?



Thanks,
Jack=



--001a113fb786b29b03053a3a4c13--