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 068C3200C05 for ; Mon, 23 Jan 2017 14:54:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 05642160B53; Mon, 23 Jan 2017 13:54:33 +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 ED8FD160B49 for ; Mon, 23 Jan 2017 14:54:31 +0100 (CET) Received: (qmail 49994 invoked by uid 500); 23 Jan 2017 13:54:30 -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 49907 invoked by uid 99); 23 Jan 2017 13:54:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2017 13:54:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2091EC1870 for ; Mon, 23 Jan 2017 13:54:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fRdysyYqLWKC for ; Mon, 23 Jan 2017 13:54:28 +0000 (UTC) Received: from mail.nododos.com (mail.nododos.com [54.208.244.54]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 27B4D5FAD8 for ; Mon, 23 Jan 2017 13:54:28 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.nododos.com (Postfix) with ESMTP id 99FF4C2B9F for ; Mon, 23 Jan 2017 13:46:11 +0000 (UTC) Received: from mail.nododos.com ([127.0.0.1]) by localhost (mail.nododos.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4vsrhV8ZsJ5k for ; Mon, 23 Jan 2017 13:46:07 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.nododos.com (Postfix) with ESMTP id 0133FC2BA2 for ; Mon, 23 Jan 2017 13:46:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at nododos.com Received: from mail.nododos.com ([127.0.0.1]) by localhost (mail.nododos.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0dkvIt74V2LI for ; Mon, 23 Jan 2017 13:46:04 +0000 (UTC) Received: from mail.nododos.com (mail.nododos.com [10.4.10.21]) by mail.nododos.com (Postfix) with ESMTP id E0FDCC2B9F for ; Mon, 23 Jan 2017 13:46:02 +0000 (UTC) Date: Mon, 23 Jan 2017 13:46:01 +0000 (UTC) From: Joe Olson To: user@flink.apache.org Message-ID: <944779580.51400.1485179161639.JavaMail.zimbra@nododos.com> Subject: Queryable State and Windows MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_51399_1392513303.1485179161635" X-Originating-IP: [73.8.56.50] X-Mailer: Zimbra 8.5.0_GA_3042 (ZimbraWebClient - FF50 (Mac)/8.5.0_GA_3042) Thread-Topic: Queryable State and Windows Thread-Index: kqIaKXgpuMWprDB3FGX25TnkHTUIdQ== archived-at: Mon, 23 Jan 2017 13:54:33 -0000 ------=_Part_51399_1392513303.1485179161635 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit From what I've read in the documentation, and from the examples I've seen, in order to make state queryable externally to Flink, the state descriptor variables need access to the Flink runtime context. This means the stream processor has to have access to the 'Rich' level objects - 'RichFlatMap' for example. All the SNAPSHOT1.2 queryable state examples I have seen revolve around RichFlatMap. Is there a way to get the runtime context exposed so that you can have state descriptor variables queryable from within a Flink window, while the window is loading? My processor is built around the following: .addSource(new FlinkKafkaConsumer010()) .assignTimestampsAndWatermarks(new MyTimestampsAndWatermarks()) .keyBy() .window(GlobalWindows.create()) .trigger(new myTrigger()) .apply(new myWindowFunction()) .addSink(new mySink()) The only rich object in this chain are available in the apply (RichWindowFunction). But that is too late - I want to be able to query out whats in the window while it is filling. I know I have access to onElement in the trigger, and I can set up the state descriptor variables there, but the variables don't seem to have exposure to the runtime environment within the trigger. Is there a way to get queryable state within a Flink window while it is filling? ------=_Part_51399_1392513303.1485179161635 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
From what I've read in the documentation, a= nd from the examples I've seen, in order to make state queryable externally= to Flink, the state descriptor variables need access to the Flink runtime = context.

=
This means the stream processor has to have access to the 'Rich' level= objects - 'RichFlatMap' for example. All the SNAPSHOT1.2 queryable state e= xamples I have seen revolve around RichFlatMap.

Is there a way to get the runti= me context exposed so that you can have state descriptor variables queryabl= e from within a Flink window, while the window is loading?

My processor is buil= t around the following:

.addSource(new FlinkKafkaConsumer010())
.assignTimestampsAndWatermarks(new MyTimestampsAndWater= marks())
.keyBy()
.window(GlobalWindows.create())
.trigger(new myT= rigger())
.apply(new myWindowFunction())
.addSink(new mySink())
=

The only rich object in this chain= are available in the apply (RichWindowFunction). But that is too late - I = want to be able to query out whats in the window while it is filling. I kno= w I have access to onElement in the trigger, and I can set up the state des= criptor variables there, but the variables don't seem to have exposure to t= he runtime environment within the trigger.

Is there a way to get queryable stat= e within a Flink window while it is filling?
=

------=_Part_51399_1392513303.1485179161635--