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 AF518200C39 for ; Thu, 2 Mar 2017 03:36:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ADFD0160B70; Thu, 2 Mar 2017 02:36:52 +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 CC2B1160B78 for ; Thu, 2 Mar 2017 03:36:51 +0100 (CET) Received: (qmail 61530 invoked by uid 500); 2 Mar 2017 02:36:45 -0000 Mailing-List: contact dev-help@apex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.apache.org Delivered-To: mailing list dev@apex.apache.org Received: (qmail 61519 invoked by uid 99); 2 Mar 2017 02:36:45 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2017 02:36:45 +0000 Received: from mail-ot0-f171.google.com (mail-ot0-f171.google.com [74.125.82.171]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 942E01A02FC for ; Thu, 2 Mar 2017 02:36:45 +0000 (UTC) Received: by mail-ot0-f171.google.com with SMTP id x10so43419214otb.1 for ; Wed, 01 Mar 2017 18:36:45 -0800 (PST) X-Gm-Message-State: AMke39k00FyzVglb0uwLXtwCre2LDHwr1BupWiHQwBsc5B0wOYcwmcrvyp17Cs6vwc3Q0y1xlGdF3Z+hSrivQg== X-Received: by 10.157.51.93 with SMTP id u29mr1908757otd.7.1488422204684; Wed, 01 Mar 2017 18:36:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.156.73 with HTTP; Wed, 1 Mar 2017 18:36:44 -0800 (PST) In-Reply-To: References: From: Thomas Weise Date: Wed, 1 Mar 2017 18:36:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: APEXCORE-619 Recovery windowId in future during application relaunch. To: dev@apex.apache.org Content-Type: multipart/alternative; boundary=001a113e2754c94d020549b64c9f archived-at: Thu, 02 Mar 2017 02:36:52 -0000 --001a113e2754c94d020549b64c9f Content-Type: text/plain; charset=UTF-8 Dummy checkpoints, continuously writing committed window id and the like all introduce overhead that is probably not needed. All the information to derive what we need is likely available and IMO the discussion should be on what is the correct way of using it. I will have a look when I get to it as well. Thanks, Thomas On Wed, Mar 1, 2017 at 6:29 PM, Sandesh Hegde wrote: > Instead of treating the stateless operator in a special way and missing > corner cases, just have a dummy checkpoint, then there is no need to handle > corner cases. > > There is a name for this solution, > https://en.wikipedia.org/wiki/Null_Object_pattern > > > > On Wed, Mar 1, 2017 at 2:52 PM Pramod Immaneni > wrote: > > > There is code in various places that deals with stateless operators in a > > special way even though a physical checkpoint does not exist on the disk. > > It is probably a matter of applying similar thought process/logic > correctly > > here. > > > > On Wed, Mar 1, 2017 at 2:27 PM, Amol Kekre wrote: > > > > > hmm! the fact that commitWindowId has moved up (right now in memory of > > > Stram) should mean that a complete set of checkpoints are available, > i.e > > > commitWindowId can be derived. Lets say that next checkpoint window > also > > > gets checkpointed across the app, commitwindowID is in memory but not > > > written to stram-state yet, then upon relaunch the latest > commitwindowID > > > should get computed correctly. > > > > > > This may be just about setting stateless operators to commitWindowid on > > > re-launch? aka bug/feature? > > > > > > Thks > > > Amol > > > > > > > > > > > > E:amol@datatorrent.com | M: 510-449-2606 <(510)%20449-2606> | Twitter: > > @*amolhkekre* > > > > > > www.datatorrent.com | apex.apache.org > > > > > > *Join us at Apex Big Data World-San Jose > > > , April 4, 2017!* > > > [image: http://www.apexbigdata.com/san-jose-register.html] > > > > > > > > > On Wed, Mar 1, 2017 at 1:41 PM, Pramod Immaneni < > pramod@datatorrent.com> > > > wrote: > > > > > > > Do we need to save committedWindowId? Can't it be computed from > > existing > > > > checkpoints by walking through the DAG. We probably do this anyway > and > > I > > > > suspect there is a minor bug somewhere in there. If an operator is > > > > stateless you could assume checkpoint as long max for sake of > > computation > > > > and compute the committed window to be the lowest common checkpoint. > If > > > > they are all stateless and you end up with long max you can start > with > > > > window id that reflects the current timestamp. > > > > > > > > Thanks > > > > > > > > On Wed, Mar 1, 2017 at 1:09 PM, Amol Kekre > > wrote: > > > > > > > > > CommitWindowId could be computed from the existing checkpoints. > That > > > > > solution still needs purge to be done after commitWindowId is > > confirmed > > > > to > > > > > be saved in Stram state. Without ths the commitWindowId computed > from > > > the > > > > > checkpoints may have some checkpoints missing. > > > > > > > > > > Thks > > > > > Amol > > > > > > > > > > > > > > > > > > > > E:amol@datatorrent.com | M: 510-449-2606 <(510)%20449-2606> | > > Twitter: @*amolhkekre* > > > > > > > > > > www.datatorrent.com | apex.apache.org > > > > > > > > > > *Join us at Apex Big Data World-San Jose > > > > > , April 4, 2017!* > > > > > [image: http://www.apexbigdata.com/san-jose-register.html] > > > > > > > > > > > > > > > On Wed, Mar 1, 2017 at 12:36 PM, Pramod Immaneni < > > > pramod@datatorrent.com > > > > > > > > > > wrote: > > > > > > > > > > > Can't the commitedWindowId be calculated by looking at the > physical > > > > plan > > > > > > and the existing checkpoints? > > > > > > > > > > > > On Wed, Mar 1, 2017 at 5:34 AM, Tushar Gosavi > > > > > wrote: > > > > > > > > > > > > > Help Needed for APEXCORE-619 > > > > > > > > > > > > > > Issue : When application is relaunched after long time with > > > stateless > > > > > > > opeartors at the end of the DAG, the stateless operators starts > > > with > > > > a > > > > > > very > > > > > > > high windowId. In this case the stateless operator ignors all > the > > > > data > > > > > > > received till upstream operator catches up with it. This breaks > > the > > > > > > > *at-least-once* gaurantee while relaunch of the opeartor or > when > > > > master > > > > > > is > > > > > > > killed and application is restarted. > > > > > > > > > > > > > > Solutions: > > > > > > > - Fix windowId for stateless leaf operators from upstream > > opeartor. > > > > But > > > > > > it > > > > > > > has some issues when we have a join with two upstrams operators > > at > > > > > > > different windowId. If we set the windowID to min(upstream > > > windowId), > > > > > > then > > > > > > > we need to again recalulate the new recovery window ids for > > > upstream > > > > > > paths > > > > > > > from this operators. > > > > > > > > > > > > > > - Other solution is to create a empty file in checkpoint > > directory > > > > for > > > > > > > stateless operators. This will help us to identify the > > checkpoints > > > of > > > > > > > stateless operators during relaunch instead of computing from > > > latest > > > > > > > timestamp. > > > > > > > > > > > > > > - Bring the entire DAG to committedWindowId. This could be > > achived > > > > > using > > > > > > > writing committedWindowId in a journal. we need to make sure > that > > > we > > > > > are > > > > > > > not puring the checkpointed state until the committedWundowId > is > > > > saved > > > > > in > > > > > > > journal. > > > > > > > > > > > > > > Let me know your thoughs on this and preferred solution. > > > > > > > > > > > > > > Regards, > > > > > > > -Tushar. > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > *Join us at Apex Big Data World-San Jose > , April 4, 2017!* > [image: http://www.apexbigdata.com/san-jose-register.html] > --001a113e2754c94d020549b64c9f--