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 30F9B200C04 for ; Tue, 10 Jan 2017 05:52:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2F9BA160B49; Tue, 10 Jan 2017 04:52:45 +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 5012A160B3E for ; Tue, 10 Jan 2017 05:52:44 +0100 (CET) Received: (qmail 2812 invoked by uid 500); 10 Jan 2017 04:52:43 -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 2802 invoked by uid 99); 10 Jan 2017 04:52:43 -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; Tue, 10 Jan 2017 04:52:43 +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 D9ADAC7023 for ; Tue, 10 Jan 2017 04:52:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.901 X-Spam-Level: * X-Spam-Status: No, score=1.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, UNPARSEABLE_RELAY=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=alibaba-inc.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Rm7JrfmM73nD for ; Tue, 10 Jan 2017 04:52:34 +0000 (UTC) Received: from out0-132.mail.aliyun.com (out0-132.mail.aliyun.com [140.205.0.132]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A9F235FD3F for ; Tue, 10 Jan 2017 04:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alibaba-inc.com; s=default; t=1484023922; h=From:Content-Type:Message-Id:Mime-Version:Subject:Date:To; bh=Mxuvhh5PjLunadiAy0Q189r15AQo/WsCE6Y/nbrNtZY=; b=QrI/k91X9X2FJVchRITJkrmkQmFYBmuXCH89z66A0BkgiPzvqvU5iui9+UW+SOCT5PUBgmtvkAXjh/Oo4SqHnccdpn+v01z2/AeuFHLysJVRQcz++fIdCNYsn90XAKbmRFoHqjIGhDI4wVDIaDf12h1wEXOzyR4X3RP7jUjjS/o= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03296;MF=wuchong.wc@alibaba-inc.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---.7Q6QahA_1484023900; Received: from 30.9.68.78(mailfrom:wuchong.wc@alibaba-inc.com ip:42.120.74.102) by smtp.aliyun-inc.com(127.0.0.1); Tue, 10 Jan 2017 12:51:40 +0800 From: "Jark Wu" Content-Type: multipart/alternative; boundary="Apple-Mail=_DBC9D139-1523-448D-BC86-D059F010598D" Message-Id: <935EA14C-1411-4798-AE3E-106D13F15F74@alibaba-inc.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: access to key in sink Date: Tue, 10 Jan 2017 12:51:39 +0800 References: <630182100.2136873.1482595925042.ref@mail.yahoo.com> <630182100.2136873.1482595925042@mail.yahoo.com> To: user@flink.apache.org, Telco Phone In-Reply-To: <630182100.2136873.1482595925042@mail.yahoo.com> X-Mailer: Apple Mail (2.2104) archived-at: Tue, 10 Jan 2017 04:52:45 -0000 --Apple-Mail=_DBC9D139-1523-448D-BC86-D059F010598D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=gb2312 Hi Telco, What do you mean about the =A1=B0keyBy value=A1=B1 ? Is it the string = parameter value, i.e. =A1=B0partition=A1=B1 in your case , or the real = key value of an actual element being processed ?=20 If you mean the string parameter value, it seems that currently it = doesn=A1=AFt support. If you mean the latter one, Aljoscha has pointed = out. - Jark Wu=20 > =D4=DA 2016=C4=EA12=D4=C225=C8=D5=A3=AC=C9=CF=CE=E712:12=A3=ACTelco = Phone =D0=B4=B5=C0=A3=BA >=20 > I am trying to access the keyBy value in the "open" method in a = RichSink >=20 >=20 > Is there a way to access the actual keyBy value in the RichSink ? >=20 >=20 >=20 > DataStream stream =3D > env.addSource(new FlinkKafkaConsumer08<>("test", schema, = properties) > ).setParallelism(1).keyBy("partition"); --Apple-Mail=_DBC9D139-1523-448D-BC86-D059F010598D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=gb2312
Hi Telco,

What do you mean about the =A1=B0keyBy = value=A1=B1 ?  Is it the string parameter value, i.e. =A1=B0partition= =A1=B1 in your case , or the real key value of an actual element being = processed ? 

If you mean the string parameter value, it seems that = currently it doesn=A1=AFt support. If you mean the latter one, Aljoscha = has pointed out.

- Jark Wu 

=D4=DA 2016=C4=EA12=D4=C225=C8=D5=A3=AC=C9=CF=CE=E712:12=A3=ACT= elco Phone <telco5@yahoo.com> =D0=B4=B5=C0=A3=BA

I am = trying to access the keyBy value in the "open" method in a = RichSink


Is = there a way to access the actual keyBy value in the RichSink ?



DataStream<TestRecord> stream =3D
= env.addSource(new = FlinkKafkaConsumer08<>("test", schema, = properties)
).setParallelism(1).keyBy("partition");

= --Apple-Mail=_DBC9D139-1523-448D-BC86-D059F010598D--