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 C80B32009C6 for ; Tue, 31 May 2016 11:27:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C6BBF160A43; Tue, 31 May 2016 09:27:24 +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 E5C8B160A01 for ; Tue, 31 May 2016 11:27:23 +0200 (CEST) Received: (qmail 5698 invoked by uid 500); 31 May 2016 09:27:23 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 5680 invoked by uid 99); 31 May 2016 09:27:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2016 09:27:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 33337C0608 for ; Tue, 31 May 2016 09:27:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.98 X-Spam-Level: * X-Spam-Status: No, score=1.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id WUD1rkvQS_OR for ; Tue, 31 May 2016 09:27:20 +0000 (UTC) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id DE4AF5FBA1 for ; Tue, 31 May 2016 09:27:19 +0000 (UTC) Received: by mail-it0-f51.google.com with SMTP id i127so22507120ita.1 for ; Tue, 31 May 2016 02:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to; bh=1DnVezW7nyfYRwX9UBRVxicYmb0dnszik8NoJHYOD6g=; b=fQev+xaEVWDxZkm4IicFKzEwsnQh8KqIS5SfTFlExTOIcnC6mDYJS1z5mf1ZlgY4TS Fdz86sKZ1kueIXorsJkmhcbe5d9Gcl9+o99QOOxTPU9wtgTRxQMjHvntbqgFjbUIztJI mgOCsZQ5saOlOmA2A9FI9l083M/pJszurQN/+WS4vOikHtnDybuUU2V5i6gca1ESn3cM XMMS+T78E3gy3p3I+/ZLUcTpO2Fx/2xJX+6CCaeSEd5JQy3VeHFNf6T3vstxv0zIkES6 vchNr0XL0JczscFn0pIczJ96kzPp6nBGtj2+CVkkviS/6cyGbi9kW1hJ7hZLj1loe+wO r8xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to; bh=1DnVezW7nyfYRwX9UBRVxicYmb0dnszik8NoJHYOD6g=; b=RgmuqcAdGXx3/yQxLO7Howeoa4zNL3pff2orSi/8NJZyPGRCGjH57Wk0u11CrPvUnD EVtKwgjxNiQ56TAszxmBi5I5ayS/GChrZO9IeoGaqfx0v+tfB2Q3DZ8+3Lpn33tW5aAz KPvAQOT2N2MQIaXX9BoL+keo0SUSrKiGqyyvtTc/SwoohXO8Ht7st37bIic+hEMGbiuB LivxwWhlL9WXT3ReMkgp7RJtWn8cKHAJSI85DSwaqApiQz2m5Zdb5VHE780qZ1LSPaee TBXax+ODiwn0Ohna/3FfiOkIOlr8t0z5lGaIUzDymuHj1BB+bEEbsrxYWKhiOb74Cjbl hy6g== X-Gm-Message-State: ALyK8tJ7vmD9UEBJHDIAc6q7UrlCultumLJ8EUj8MyEcnwqfFJKTDAUmtnbgc4z8lAmwH6/ii1Rm3fhl9CR5sw== MIME-Version: 1.0 X-Received: by 10.36.92.199 with SMTP id q190mr11397582itb.25.1464686833328; Tue, 31 May 2016 02:27:13 -0700 (PDT) Sender: ewenstephan@gmail.com Received: by 10.107.15.207 with HTTP; Tue, 31 May 2016 02:27:13 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 May 2016 11:27:13 +0200 X-Google-Sender-Auth: TR1Q-RRNaVmJkcuChWHlB55OrVo Message-ID: Subject: Re: Side-effects of DataSet::count From: Stephan Ewen To: "dev@flink.apache.org" Content-Type: multipart/alternative; boundary=001a1144b952686d0d05341ffa53 archived-at: Tue, 31 May 2016 09:27:25 -0000 --001a1144b952686d0d05341ffa53 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! There was some preliminary work on this. By now, the requirements have grown a bit. The backtracking needs to handle - Scheduling for execution (the here raised point), possibly resuming from available intermediate results - Recovery from partially executed programs, where operators execute whole or not (batch style) - Recover from intermediate result since latest completed checkpoint - Eventually even recover superstep-based iterations. So the design needs to be extended slightly. We do not have a design writeup for this, but I agree, it would be great to have one. I have a pretty good general idea about this, let me see if I can get to that next week. In general, for such things (long standing ideas and designs), we should have something like Kafka has with its KIPs (Kafka Improvement Proposal) - a place where to collect them, refine them over time, and see how people react to them or step up to implement them. We could call them 3Fs (Flink Feature Forms) ;-) Greetings, Stephan On Tue, May 31, 2016 at 1:02 AM, Greg Hogan wrote: > Hi Stephan, > > Is there a design document, prior discussion, or background material on > this enhancement? Am I correct in understanding that this only applies to > DataSet since streams run indefinitely? > > Thanks, > Greg > > On Mon, May 30, 2016 at 5:49 PM, Stephan Ewen wrote: > > > Hi Eron! > > > > Yes, the idea is to actually switch all executions to a backtracking > > scheduling mode. That simultaneously solves both fine grained recovery > and > > lazy execution, where later stages build on prior stages. > > > > With all the work around streaming, we have not gotten to this so far, > but > > it is one feature still in the list... > > > > Greetings, > > Stephan > > > > > > On Mon, May 30, 2016 at 9:55 PM, Eron Wright wrote: > > > > > Thinking out loud now=E2=80=A6 > > > > > > Is the job graph fully mutable? Can it be cleared? For example, > > > shouldn=E2=80=99t the count method remove the sink after execution co= mpletes? > > > > > > Can numerous job graphs co-exist within a single driver program? H= ow > > > would that relate to the session concept? > > > > > > Seems the count method should use =E2=80=98backtracking=E2=80=99 sche= dule mode, and > only > > > execute the minimum needed to materialize the count sink. > > > > > > > On May 29, 2016, at 3:08 PM, M=C3=A1rton Balassi < > balassi.marton@gmail.com> > > > wrote: > > > > > > > > Hey Eron, > > > > > > > > Yes, DataSet#collect and count methods implicitly trigger a JobGrap= h > > > > execution, thus they also trigger writing to any previously defined > > > sinks. > > > > The idea behind this behavior is to enable interactive querying (th= e > > one > > > > that you are used to get from a shell environment) and it is also a > > great > > > > debugging tool. > > > > > > > > Best, > > > > > > > > Marton > > > > > > > > On Sun, May 29, 2016 at 11:28 PM, Eron Wright > > wrote: > > > > > > > >> I was curious as to how the `count` method on DataSet worked, and > was > > > >> surprised to see that it executes the entire program graph. > Wouldn=E2=80=99t > > > this > > > >> cause undesirable side-effects like writing to sinks? Also > strange > > > that > > > >> the graph is mutated with the addition of a sink (that isn=E2=80= =99t > > > subsequently > > > >> removed). > > > >> > > > >> Surveying the Flink code, there aren=E2=80=99t many situations whe= re the > > program > > > >> graph is implicitly executed (`collect` is another). Nonetheless= , > > this > > > >> has deepened my appreciation for how dynamic the application might > be. > > > >> > > > >> // DataSet.java > > > >> public long count() throws Exception { > > > >> final String id =3D new AbstractID().toString(); > > > >> > > > >> output(new Utils.CountHelper(id)).name("count()"); > > > >> > > > >> JobExecutionResult res =3D getExecutionEnvironment().execute(); > > > >> return res. getAccumulatorResult(id); > > > >> } > > > >> Eron > > > > > > > > > --001a1144b952686d0d05341ffa53--