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 8F745200C08 for ; Thu, 26 Jan 2017 15:22:21 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8E1C1160B40; Thu, 26 Jan 2017 14:22:21 +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 D8A5B160B33 for ; Thu, 26 Jan 2017 15:22:20 +0100 (CET) Received: (qmail 21812 invoked by uid 500); 26 Jan 2017 14:22:19 -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 21801 invoked by uid 99); 26 Jan 2017 14:22:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jan 2017 14:22:19 +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 33D681A05DE for ; Thu, 26 Jan 2017 14:22:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.38 X-Spam-Level: ** X-Spam-Status: No, score=2.38 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, 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-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id pT4aQo6dcEbR for ; Thu, 26 Jan 2017 14:22:17 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 350925F1F4 for ; Thu, 26 Jan 2017 14:22:17 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id r144so86690228wme.1 for ; Thu, 26 Jan 2017 06:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=hUHzu+dJi2SFQJTXAY5mVIL9JJiSsDHXe0o7g7aHnoY=; b=mt28SnvtDnBMpKkel6DYGk6kSr4aSinHNYr+p/KhiA99itSEPyXzbQZ+Xvm5B20Aoc zYnVLj888fbMvH3U/reGSdW9sX+ycuAVSMBy8N7H6CIsxeNtqx0l/+MsFyo3VWixrPCj +Z4qIxd6CJ1SSyaRcqlahP5v33ewuMbg4FIImmcPV+VY+bA9d8A+709M5wjMLdpv1M9+ heUqa8g2AMwfQeBKnKRj5V8L0VeTLcV5DZQTZsbjbmV3XVDnhIfdyPikAvcsaX4Afrzv zTIr6ZgTU041WRn9qRd0PTb5IXsXF/oD6EbyGXH4vEuhnyoezIryeimVLW2HewkiAr6a JT/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=hUHzu+dJi2SFQJTXAY5mVIL9JJiSsDHXe0o7g7aHnoY=; b=U7n2rIZsUpm3dvIhivcR/xZNddGVjfPwEvjMaxcXmwhUUKKbVOwRkW6Th2VbwAZ5z5 0uXEvDReZ2hbUvemxXPvHKL19F6Lq4uhtELFHGXjtS4HpR8C5nOt7+bipLxC3r2vdJ1P cII6mw0qJOHPBLgQtV8J6L89xQvqxYP2AAVCUvig3VLw3Y8/L+qlYEfoa8kKy3rYXrax OiHl6R9eREV1hd0upXs5rEMpXav4EPXVEJUhAqa7+LpuVFtS6tqm9BBCoP9xX9wL5yKh nqjpFmd9692Kgu4SgovZBRdwDEQPsC33cDQEB8iz/ap7ngpy5un+8f+TLWykOb/HJKLm 3MuA== X-Gm-Message-State: AIkVDXLixjrnBT7sGD4MsWD81BXCfW0fdmMtAnt1NR6MgsRFvQ/z9XnThbqrLsc9Glebadt35XZl3KD8rJ80gA== X-Received: by 10.28.23.66 with SMTP id 63mr2990704wmx.46.1485440536322; Thu, 26 Jan 2017 06:22:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.113.99 with HTTP; Thu, 26 Jan 2017 06:21:45 -0800 (PST) In-Reply-To: <897438718.52960.1485436243035.JavaMail.zimbra@nododos.com> References: <897438718.52960.1485436243035.JavaMail.zimbra@nododos.com> From: Fabian Hueske Date: Thu, 26 Jan 2017 15:21:45 +0100 Message-ID: Subject: Re: State Descriptors / Queryable State Question To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a11468aa880a9b50547001348 archived-at: Thu, 26 Jan 2017 14:22:21 -0000 --001a11468aa880a9b50547001348 Content-Type: text/plain; charset=UTF-8 Hi Joe, working on a KeyedStream means that the records are partitioned by that key, i.e., all records with the same key are processed by the same thread. Therefore, only on thread accesses the state for a particular key. Other tasks do not have read or write access to the state of other tasks. Best, Fabian 2017-01-26 14:10 GMT+01:00 Joe Olson : > If I have a keyed stream going in to a N node Flink stream processor, and > I had a job that was keeping a count using a ValueStateDescriptor (per > key), would that descriptor be synchronized among all the nodes? > > i.e. Are the state descriptors interfaces (ValueStateDescriptor, > ListStateDescriptor) threadsafe?If I expose that descriptor via the > RunTimeContext, will I get a consistent value back from each of the nodes? > > Thanks! > > --001a11468aa880a9b50547001348 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Joe,

working on a KeyedStre= am means that the records are partitioned by that key, i.e., all records wi= th the same key are processed by the same thread.
Therefore, only on th= read accesses the state for a particular key.
Other tasks do not h= ave read or write access to the state of other tasks.

Best, Fa= bian

201= 7-01-26 14:10 GMT+01:00 Joe Olson <technology@nododos.com>:
If I have a keyed = stream going in to a N node Flink stream processor, and I had a job that wa= s keeping a count using a ValueStateDescriptor (per key), would that descri= ptor be synchronized among all the nodes?

i.e.= Are the state descriptors interfaces (ValueStateDescriptor, ListStateDescr= iptor) threadsafe?If I expose that descriptor via the RunTimeContext, will = I get a consistent value back from each of the nodes?

Thanks!


=
--001a11468aa880a9b50547001348--