From user-return-23790-archive-asf-public=cust-asf.ponee.io@flink.apache.org Sat Oct 20 10:24:51 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 48EF9180668 for ; Sat, 20 Oct 2018 10:24:50 +0200 (CEST) Received: (qmail 99270 invoked by uid 500); 20 Oct 2018 08:24:48 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 99260 invoked by uid 99); 20 Oct 2018 08:24:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Oct 2018 08:24:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6915E180724 for ; Sat, 20 Oct 2018 08:24:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.889 X-Spam-Level: * X-Spam-Status: No, score=1.889 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id X0HJQOiVZL2R for ; Sat, 20 Oct 2018 08:24:45 +0000 (UTC) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9CD515F3EA for ; Sat, 20 Oct 2018 08:24:44 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id y19-v6so33434095edd.2 for ; Sat, 20 Oct 2018 01:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=arWSCvxhtIOCFe0Nk1lpfpmRxkZC74MbwhRL0QK5O/o=; b=QkydVWF7lQ4ii/l25n0UEQNBAkH9niE4Pw3eE0b8CH0TTBKNRwfcXXSkGRyzZz+l9Y xEFTqAoYudEn7SU8bLDERunWzRmqX9meFOn+wgiomLjyWI84ijrG4LFCbvpwL6tUlEeP dNHW871fe9qkfqfK/qJK+l5C24QrK5tK8wxAOg0yDTJAUphgf3vc4MgDB7x7M7oW2EV9 IK3DP4wg6X92+njb4WK3Y//C6Qo9fOBOTv3eD5TLHmEs26VYFBUFNemFNINDFX3QD2o3 i1tEFjk/b0E+o3gEl9kBKzyjuDqxSCSe22BqeMOj+OOyAU+02HRCP3lDW2okguQKIo73 sXAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=arWSCvxhtIOCFe0Nk1lpfpmRxkZC74MbwhRL0QK5O/o=; b=sdWdU2PI8YeC9F11DoNTbDHb54jMcJHuVg+eS2VJPd/UaSJ/M5dDWX+gGRof21V8C4 rkhL+M7pqUSVRvz/biHdQPpIE1+RAlx2Lb/oSVbInGtAYQkfncjbPJ861OOel30ZZIol HuZGU/JGEuaR5X1yn+hD6pmztkNl+K/8dAIGWjLln96qoYK1GC7AE9CJwMUnQcLwL+K8 mJihtpISeXqblyClvXC5k/ShrQDJeZfXEXO4g3gWqy23S3Qk0mtFDIBpvMvxLCBld4t5 0ZadN3AB5/5wxs4Rfc51e/9SFNtks5fDMZpG521TUe+xu3VsLxNnuEZ4JHmA+0WK7XpJ YB6g== X-Gm-Message-State: ABuFfohfdr0GduZm3V/BNc1pZ6Xa1fur70hau1dDsCD9QrniSaIa5Cwb 4x7Qv7RXKEjTjt7UOBy5xBwWBaiE X-Google-Smtp-Source: ACcGV61giK0HzoRBl335rZvZm3RKdmmNTsNiEgOve6KifpMHG4E6jJhx2x+Ba7EYnnjgCLL+y9Oqcg== X-Received: by 2002:a17:906:6686:: with SMTP id z6-v6mr32501362ejo.144.1540023883152; Sat, 20 Oct 2018 01:24:43 -0700 (PDT) Received: from ?IPv6:2a02:c7d:3b81:e600:506b:e848:9024:6d89? ([2a02:c7d:3b81:e600:506b:e848:9024:6d89]) by smtp.gmail.com with ESMTPSA id z33-v6sm11548260edb.85.2018.10.20.01.24.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Oct 2018 01:24:42 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-EC3DC93D-E069-47D6-B475-0D16D2F32886 Mime-Version: 1.0 (1.0) Subject: Re: Initializing mapstate hangs From: Ahmad Hassan X-Mailer: iPhone Mail (15D100) In-Reply-To: Date: Sat, 20 Oct 2018 09:24:41 +0100 Cc: user Content-Transfer-Encoding: 7bit Message-Id: <2AA92376-18B6-468B-A2C7-D15FFA680064@gmail.com> References: To: vino yang --Apple-Mail-EC3DC93D-E069-47D6-B475-0D16D2F32886 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Flink 1.6.0. Valuestate initialises successful but mapstate hangs=20 Regards=20 > On 20 Oct 2018, at 02:55, vino yang wrote: >=20 > Hi Ahmad, >=20 > Which version of Flink do you use? >=20 > Thanks, vino. >=20 > Ahmad Hassan =E4=BA=8E2018=E5=B9=B410=E6=9C=8819=E6= =97=A5=E5=91=A8=E4=BA=94 =E4=B8=8B=E5=8D=8811:32=E5=86=99=E9=81=93=EF=BC=9A >> Hi, >>=20 >> Initializing mapstate hangs in window function. However if i use valuesta= te then it is initialized succcessfully. I am using rocksdb to store the sta= te. >>=20 >> public class MyWindowFunction extends RichWindowFunction >> { >> private transient MapStateDescriptor productsDescri= ptor =3D new MapStateDescriptor<>( >> "mapState", String.class, String.class); >>=20 >> @Override >> public void apply(Tuple key, TimeWindow window, final Iterable input, >> final Collector out) >> { >> // do something >> } >>=20 >> @Override >> public void open(Configuration parameters) throws Exception >> { >> System.out.println("## open init window state "); >> MapState state =3D this.getRuntimeContext()= .getMapState(productsDescriptor); <<< program hangs here >> System.out.println("## open window state " + state); >> } >> } >>=20 >> Thanks for the help. --Apple-Mail-EC3DC93D-E069-47D6-B475-0D16D2F32886 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Flink 1.6.0. Valuestate initialises success= ful but mapstate hangs 

Regards 

On 20 Oct 2018= , at 02:55, vino yang <yanghua11= 27@gmail.com> wrote:

Hi Ahmad,

Which version of = Flink do you use?

Thanks, vino.
Ahmad Hassan <ahmad.hassan@gmail.com> =E4=BA=8E2018=E5= =B9=B410=E6=9C=8819=E6=97=A5=E5=91=A8=E4=BA=94 =E4=B8=8B=E5=8D=8811:32=E5=86= =99=E9=81=93=EF=BC=9A
Hi,

Initializing mapstate hangs in win= dow function. However if i use valuestate then it is initialized succcessful= ly. I am using rocksdb to store the state.

pub= lic class MyWindowFunction extends RichWindowFunction<Event, Payload, Tup= le, TimeWindow>
{
private tran= sient MapStateDescriptor<String, String> productsDescriptor =3D new Ma= pStateDescriptor<>(
"mapState", String.class, String.class);

@Override
public void a= pply(Tuple key, TimeWindow window, final Iterable<Event> input,
<= div> final Collector<Payload&g= t; out)
{
= // do something
}

@Override
public void open(Configuration parameters) throws Exception
{
Syst= em.out.println("## open init window state ");
= MapState<String, String> state =3D this.getRuntimeCont= ext().getMapState(productsDescriptor); <<< program hangs here
System.out.println("## open window s= tate " + state);
}
}
<= /div>

Thanks for the help.
= --Apple-Mail-EC3DC93D-E069-47D6-B475-0D16D2F32886--