Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAD2B18C5C for ; Fri, 18 Dec 2015 10:57:36 +0000 (UTC) Received: (qmail 77059 invoked by uid 500); 18 Dec 2015 10:57:36 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 76971 invoked by uid 500); 18 Dec 2015 10:57: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 76961 invoked by uid 99); 18 Dec 2015 10:57:36 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2015 10:57:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 11FE01A12EE for ; Fri, 18 Dec 2015 10:57:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id oWEDMP6qA2Zf for ; Fri, 18 Dec 2015 10:57:30 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id CA668201F7 for ; Fri, 18 Dec 2015 10:57:29 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id l133so69832375lfd.2 for ; Fri, 18 Dec 2015 02:57:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=tzbpmMUNxqUk55fLIB7HnHi3Elkfj8h3vLHDO8JF2wM=; b=bkzofg+hULfuwrcwsSotj/1UXhtQrG4i/lN0Jp9fd+3QTegAaz8FN7jr3rSPPqes4L gMscdZWtg5brG7ahV9Qa89KGvQaCwY8N7ctfd04ANJx5cN1w/P0w677qnVJWC/d9vOZk jEwUHD+zfdduKCEJEs3RDK1HBtyArdwMOfLRDaZ8QC+7qevPnzolAwQ5endDGA4By/8B aeD6R/+tZGsgwgZl8YFKxnOwNNySTHhisnclHc0Bw2envWcXDHU93+cLHU6T2z/QnIIZ 2EhnCr0Ge1SSMg/6G8Da8GcSLERJBtPq4Zi7m3ntNopXMNL9EE0m8Yii/eT7/8CXIKJv 0uXQ== X-Received: by 10.25.152.133 with SMTP id a127mr1041814lfe.152.1450436248941; Fri, 18 Dec 2015 02:57:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.1.7 with HTTP; Fri, 18 Dec 2015 02:56:59 -0800 (PST) In-Reply-To: References: From: Fabian Hueske Date: Fri, 18 Dec 2015 11:56:59 +0100 Message-ID: Subject: Re: Size of a window without explicit trigger/evictor To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a114020ac63401c05272a0107 --001a114020ac63401c05272a0107 Content-Type: text/plain; charset=UTF-8 Hi Nirmalya, sorry for the delayed answer. First of all, Flink does not take care that our windows fit into memory. The default trigger depends on the way in which you define a window. Given a KeyedStream you can define a window in the following ways: KeyedStream s = ... s.timeWindow() // this will use an EventTimeTrigger or ProcessingTimeTrigger, depending on the time characteristics of the stream s.countWindow() // this will use a CountTrigger s.window(? extends WindowAssigner) // this will use the default trigger as defined by the WindowAssigner None of these triggers monitors the JVM heap to prevent OOMs. If you define a TimeTrigger for one hour and receive too much data, the program will crash. IMO, this behavior is preferable over early triggering which would cause semantically wrong results. If you use a ReduceFunction to compute the result of a window (and no Evictor), the window result can be partially aggregated and its state does not grow. Best, Fabian 2015-12-10 2:47 GMT+01:00 Nirmalya Sengupta : > Hello Fabian > > A small question: during the course of our recent conversation on the > behaviour of window,trigger and evictor, you had mentioned that if I - the > application programmer - do not attach a trigger to a window, Flink will > attach one by itself. This trigger ensures that the size of the window > never grows beyond a threshold, thereby ensuring that a burgeoning window > never inflicts a OOM on Flink. > > Is this a special Trigger? What's the name of the class? Moreover, how is > that threshold size (of the window) determined? Is it configurable? > > TIA. > > -- Nirmalya > > -- > Software Technologist > http://www.linkedin.com/in/nirmalyasengupta > "If you have built castles in the air, your work need not be lost. That is > where they should be. > Now put the foundation under them." > --001a114020ac63401c05272a0107 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Nirmalya,

sorry for the del= ayed answer.

First of all, Flink does not take care that our w= indows fit into memory.
The default trigger depends on the way in which= you define a window. Given a KeyedStream you can define a window in the fo= llowing ways:

KeyedStream s =3D ...
s.timeW= indow() // this will use an EventTimeTrigger or ProcessingTimeTrigger, depe= nding on the time characteristics of the stream
s.countWindow= () // this will use a CountTrigger
s.window(? extends WindowA= ssigner) // this will use the default trigger as defined by the WindowAssig= ner

None of these triggers monitors the JVM heap to preve= nt OOMs. If you define a TimeTrigger for one hour and receive too much data= , the program will crash. IMO, this behavior is preferable over early trigg= ering which would cause semantically wrong results. If you use a ReduceFunc= tion to compute the result of a window (and no Evictor), the window result = can be partially aggregated and its state does not grow.

= Best, Fabian

2015-12-10 2:47 GMT+01:00 Nirmalya Sengupta &l= t;sengupta= .nirmalya@gmail.com>:
Hello Fabian <fhueske@gmail.com>

A small question: dur= ing the course of our recent conversation on the behaviour of window,trigge= r and evictor, you had mentioned that if I - the application programmer - d= o not attach a trigger to a window, Flink will attach one by itself. This t= rigger ensures that the size of the window never grows beyond a threshold, = thereby ensuring that a burgeoning window never inflicts a OOM on Flink.

Is this a special Trigger? What's the name of th= e class? Moreover, how is that threshold size (of the window) determined? I= s it configurable?

TIA.

-- Nirmalya
=

--
Software Technologist
http://www.linkedin.com/= in/nirmalyasengupta
"If you have built castles in the air, your= work need not be lost. That is where they should be.
Now put the founda= tion under them."

--001a114020ac63401c05272a0107--