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 D13AF200B74 for ; Thu, 1 Sep 2016 20:24:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CFADD160AB5; Thu, 1 Sep 2016 18:24:59 +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 2AF5C160AA8 for ; Thu, 1 Sep 2016 20:24:58 +0200 (CEST) Received: (qmail 94455 invoked by uid 500); 1 Sep 2016 18:24:56 -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 94444 invoked by uid 99); 1 Sep 2016 18:24:56 -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; Thu, 01 Sep 2016 18:24:56 +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 4B8A2C0439 for ; Thu, 1 Sep 2016 18:24:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 5.486 X-Spam-Level: ***** X-Spam-Status: No, score=5.486 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HTML_MESSAGE=2, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled 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 6VxUVfhIairj for ; Thu, 1 Sep 2016 18:24:51 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id DF5685FC3C for ; Thu, 1 Sep 2016 18:24:50 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 4414A4592C3E5 for ; Thu, 1 Sep 2016 11:24:50 -0700 (MST) Date: Thu, 1 Sep 2016 11:22:24 -0700 (PDT) From: vinay patil To: user@flink.apache.org Message-ID: In-Reply-To: References: Subject: Re: Streaming - memory management MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_110734_1786378467.1472754144898" archived-at: Thu, 01 Sep 2016 18:25:00 -0000 ------=_Part_110734_1786378467.1472754144898 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I don't to join the third stream. And Yes, This is what I was thinking of.also : s1.union(s2).keyBy().window().apply(// outerjoin).keyBy.flatMap(// backup join) I am already done integrating with Cassandra but I feel RocksDB will be a better option, I will have to take care of the clearing part as you have suggested, will check that in documentation. I have the DTO with almost 50 fields , converting it to JSON and storing it as a state should not be a problem , or there is no harm in storing the DTO ? I think the documentation should specify the point that the state will be maintained for user-defined operators to avoid confusion. Regards, Vinay Patil On Thu, Sep 1, 2016 at 1:12 PM, Fabian Hueske-2 [via Apache Flink User Mailing List archive.] wrote: > I thought you would like to join the non-matched elements with another > (third) stream. > > --> s1.union(s2).keyBy().window().apply(// outerjoin).keyBy.connect(s3.keyBy).coFlatMap(// > backup join) > > If you want to match the non-matched stream with itself a FlatMapFunction > is the right choice. > > --> s1.union(s2).keyBy().window().apply(// outerjoin).keyBy.flatMap(// > backup join) > > The backup join puts all non-match elements in the state and waits for > another non-matched element with the same key to do the join. > > Best, Fabian > > > > 2016-09-01 19:55 GMT+02:00 vinay patil <[hidden email] > >: > >> Yes, that's what I am looking for. >> >> But why to use CoFlatMapFunction , I have already got the >> matchingAndNonMatching Stream , by doing the union of two streams and >> having the logic in apply method for performing outer-join. >> >> I am thinking of applying the same key on matchingAndNonMatching and >> flatmap to take care of rest logic. >> >> Or are you suggestion to use Co-FlatMapFunction after the outer-join >> operation (I mean after doing the window and >> getting matchingAndNonMatching stream )? >> >> Regards, >> Vinay Patil >> >> On Thu, Sep 1, 2016 at 11:38 AM, Fabian Hueske-2 [via Apache Flink User >> Mailing List archive.] <[hidden email] >> > wrote: >> >>> Thanks for the explanation. I think I understood your usecase. >>> >>> Yes, I'd go for the RocksDB approach in a CoFlatMapFunction on a keyed >>> stream (keyed by join key). >>> One input would be the unmatched outer join records, the other input >>> would serve the events you want to match them with. >>> Retrieving elements from RocksDB will be local and should be fast. >>> >>> You should be confident though, that all unmatched record will be picked >>> up at some point (RocksDB persists to disk, so you won't run out of memory >>> but snapshots size will increase). >>> The future state expiry feature will avoid such situations. >>> >>> Best, Fabian >>> >>> 2016-09-01 18:29 GMT+02:00 vinay patil <[hidden email] >>> >: >>> >>>> Hi Fabian, >>>> >>>> I had already used Co-Group function earlier but were getting some >>>> issues while dealing with watermarks (for one use case I was not getting >>>> the correct result), so I have used the union operator for performing the >>>> outer-join (WindowFunction on a keyedStream), this approach is working >>>> correctly and giving me correct results. >>>> >>>> As I have discussed the scenario, I want to maintain the non-matching >>>> records in some store, so that's why I was thinking of using RocksDB as a >>>> store here, where I will maintain the user-defined state after the >>>> outer-join window operator, and I can query it using Flink to check if the >>>> value for a particular key is present or not , if present I can match them >>>> and send it downstream. >>>> >>>> The final goal is to have zero non-matching records, so this is the >>>> backup plan to handle edge-case scenarios. >>>> >>>> I have already integrated code to write to Cassandra using Flink >>>> Connector, but I think this will be a better option rather than hitting the >>>> query to external store since RocksDb will store the data to local TM disk, >>>> the retrieval will be faster here than Cassandra , right ? >>>> >>>> What do you think ? >>>> >>>> >>>> Regards, >>>> Vinay Patil >>>> >>>> On Thu, Sep 1, 2016 at 10:19 AM, Fabian Hueske-2 [via Apache Flink User >>>> Mailing List archive.] <[hidden email] >>>> > wrote: >>>> >>>>> Hi Vinay, >>>>> >>>>> can you give a bit more detail about how you plan to implement the >>>>> outer join? Using a WIndowFunction or a CoFlatMapFunction on a KeyedStream? >>>>> >>>>> An alternative could be to use a CoGroup operator which collects from >>>>> two inputs all elements that share a common key (the join key) and are in >>>>> the same window. The interface of the function provides two iterators over >>>>> the elements of both inputs and can be used to implement outer join >>>>> functionality. The benefit of working with a CoGroupFunction is that you do >>>>> not have to take care of state handling at all. >>>>> >>>>> In case you go for a custom implementation you will need to work with >>>>> operator state. >>>>> However, you do not need to directly interact with RocksDB. Flink is >>>>> taking care of that for you. >>>>> >>>>> Best, Fabian >>>>> >>>>> 2016-09-01 16:13 GMT+02:00 vinay patil <[hidden email] >>>>> >: >>>>> >>>>>> Hi Fabian/Stephan, >>>>>> >>>>>> Waiting for your suggestion >>>>>> >>>>>> Regards, >>>>>> Vinay Patil >>>>>> >>>>>> On Wed, Aug 31, 2016 at 1:46 PM, Vinay Patil <[hidden email] >>>>>> > wrote: >>>>>> >>>>>>> Hi Fabian/Stephan, >>>>>>> >>>>>>> This makes things clear. >>>>>>> >>>>>>> This is the use case I have : >>>>>>> I am performing a outer join operation on the two streams (in >>>>>>> window) after which I get matchingAndNonMatchingStream, now I want to make >>>>>>> sure that the matching rate is high (matching cannot happen if one of the >>>>>>> source is not emitting elements for certain time) , so to tackle this >>>>>>> situation I was thinking of using RocksDB as a state Backend, where I will >>>>>>> insert the unmatched records in it (key - will be same as used for window >>>>>>> and value will be DTO ), so before inserting into it I will check if it is >>>>>>> already present in RocksDB, if yes I will take the data from it and send it >>>>>>> downstream (and ensure I perform the clean operation for that key). >>>>>>> (Also the data to store should be encrypted, encryption part can be >>>>>>> handled ) >>>>>>> >>>>>>> so instead of using Cassandra , Can I do this using RocksDB as state >>>>>>> backend since the state is not gone after checkpointing ? >>>>>>> >>>>>>> P.S I have kept the watermark behind by 1500 secs just to be safe on >>>>>>> handling late elements but to tackle edge case scenarios like the one >>>>>>> mentioned above we are having a backup plan of using Cassandra as external >>>>>>> store since we are dealing with financial critical data. >>>>>>> >>>>>>> Regards, >>>>>>> Vinay Patil >>>>>>> >>>>>>> On Wed, Aug 31, 2016 at 11:34 AM, Fabian Hueske <[hidden email] >>>>>>> > wrote: >>>>>>> >>>>>>>> Hi Vinaj, >>>>>>>> >>>>>>>> if you use user-defined state, you have to manually clear it. >>>>>>>> Otherwise, it will stay in the state backend (heap or RocksDB) >>>>>>>> until the >>>>>>>> job goes down (planned or due to an OOM error). >>>>>>>> >>>>>>>> This is esp. important to keep in mind, when using keyed state. >>>>>>>> If you have an unbounded, evolving key space you will likely run >>>>>>>> out-of-memory. >>>>>>>> The job will constantly add state for each new key but won't be >>>>>>>> able to >>>>>>>> clean up the state for "expired" keys. >>>>>>>> >>>>>>>> You could implement a clean-up mechanism this if you implement a >>>>>>>> custom >>>>>>>> stream operator. >>>>>>>> However this is a very low level interface and requires solid >>>>>>>> understanding >>>>>>>> of the internals like timestamps, watermarks and the checkpointing >>>>>>>> mechanism. >>>>>>>> >>>>>>>> The community is currently working on a state expiry feature (state >>>>>>>> will be >>>>>>>> discarded if not requested or updated for x minutes). >>>>>>>> >>>>>>>> Regarding the second question: Does state remain local after >>>>>>>> checkpointing? >>>>>>>> Yes, the local state is only copied to the remote FS (HDFS, S3, >>>>>>>> ...) but >>>>>>>> remains in the operator. So the state is not gone after a >>>>>>>> checkpoint is >>>>>>>> completed. >>>>>>>> >>>>>>>> Hope this helps, >>>>>>>> Fabian >>>>>>>> >>>>>>>> 2016-08-31 18:17 GMT+02:00 Vinay Patil <[hidden email] >>>>>>>> >: >>>>>>>> >>>>>>>> > Hi Stephan, >>>>>>>> > >>>>>>>> > Just wanted to jump into this discussion regarding state. >>>>>>>> > >>>>>>>> > So do you mean that if we maintain user-defined state (for >>>>>>>> non-window >>>>>>>> > operators), then if we do not clear it explicitly will the data >>>>>>>> for that >>>>>>>> > key remains in RocksDB. >>>>>>>> > >>>>>>>> > What happens in case of checkpoint ? I read in the documentation >>>>>>>> that after >>>>>>>> > the checkpoint happens the rocksDB data is pushed to the desired >>>>>>>> location >>>>>>>> > (hdfs or s3 or other fs), so for user-defined state does the data >>>>>>>> still >>>>>>>> > remain in RocksDB after checkpoint ? >>>>>>>> > >>>>>>>> > Correct me if I have misunderstood this concept >>>>>>>> > >>>>>>>> > For one of our use we were going for this, but since I read the >>>>>>>> above part >>>>>>>> > in documentation so we are going for Cassandra now (to store >>>>>>>> records and >>>>>>>> > query them for a special case) >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > Regards, >>>>>>>> > Vinay Patil >>>>>>>> > >>>>>>>> > On Wed, Aug 31, 2016 at 4:51 AM, Stephan Ewen <[hidden email] >>>>>>>> > wrote: >>>>>>>> > >>>>>>>> > > In streaming, memory is mainly needed for state (key/value >>>>>>>> state). The >>>>>>>> > > exact representation depends on the chosen StateBackend. >>>>>>>> > > >>>>>>>> > > State is explicitly released: For windows, state is cleaned up >>>>>>>> > > automatically (firing / expiry), for user-defined state, keys >>>>>>>> have to be >>>>>>>> > > explicitly cleared (clear() method) or in the future will have >>>>>>>> the option >>>>>>>> > > to expire. >>>>>>>> > > >>>>>>>> > > The heavy work horse for streaming state is currently RocksDB, >>>>>>>> which >>>>>>>> > > internally uses native (off-heap) memory to keep the data. >>>>>>>> > > >>>>>>>> > > Does that help? >>>>>>>> > > >>>>>>>> > > Stephan >>>>>>>> > > >>>>>>>> > > >>>>>>>> > > On Tue, Aug 30, 2016 at 11:52 PM, Roshan Naik <[hidden email] >>>>>>>> > >>>>>>>> > > wrote: >>>>>>>> > > >>>>>>>> > > > As per the docs, in Batch mode, dynamic memory allocation is >>>>>>>> avoided by >>>>>>>> > > > storing messages being processed in ByteBuffers via Unsafe >>>>>>>> methods. >>>>>>>> > > > >>>>>>>> > > > Couldn't find any docs describing mem mgmt in Streamingn >>>>>>>> mode. So... >>>>>>>> > > > >>>>>>>> > > > - Am wondering if this is also the case with Streaming ? >>>>>>>> > > > >>>>>>>> > > > - If so, how does Flink detect that an object is no longer >>>>>>>> being used >>>>>>>> > and >>>>>>>> > > > can be reclaimed for reuse once again ? >>>>>>>> > > > >>>>>>>> > > > -roshan >>>>>>>> > > > >>>>>>>> > > >>>>>>>> > >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> ------------------------------ >>>>>> View this message in context: Re: Streaming - memory management >>>>>> >>>>>> Sent from the Apache Flink User Mailing List archive. mailing list >>>>>> archive >>>>>> >>>>>> at Nabble.com. >>>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------ >>>>> If you reply to this email, your message will be added to the >>>>> discussion below: >>>>> http://apache-flink-user-mailing-list-archive.2336050.n4.nab >>>>> ble.com/Re-Streaming-memory-management-tp8829p8832.html >>>>> To start a new topic under Apache Flink User Mailing List archive., >>>>> email [hidden email] >>>>> >>>>> To unsubscribe from Apache Flink User Mailing List archive., click >>>>> here. >>>>> NAML >>>>> >>>>> >>>> >>>> >>>> ------------------------------ >>>> View this message in context: Re: Streaming - memory management >>>> >>>> Sent from the Apache Flink User Mailing List archive. mailing list >>>> archive >>>> >>>> at Nabble.com. >>>> >>> >>> >>> >>> ------------------------------ >>> If you reply to this email, your message will be added to the discussion >>> below: >>> http://apache-flink-user-mailing-list-archive.2336050.n4.nab >>> ble.com/Re-Streaming-memory-management-tp8829p8837.html >>> To start a new topic under Apache Flink User Mailing List archive., >>> email [hidden email] >>> >>> To unsubscribe from Apache Flink User Mailing List archive., click here. >>> NAML >>> >>> >> >> >> ------------------------------ >> View this message in context: Re: Streaming - memory management >> >> Sent from the Apache Flink User Mailing List archive. mailing list >> archive >> >> at Nabble.com. >> > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://apache-flink-user-mailing-list-archive.2336050. > n4.nabble.com/Re-Streaming-memory-management-tp8829p8843.html > To start a new topic under Apache Flink User Mailing List archive., email > ml-node+s2336050n1h83@n4.nabble.com > To unsubscribe from Apache Flink User Mailing List archive., click here > > . > NAML > > -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Re-Streaming-memory-management-tp8829p8845.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com. ------=_Part_110734_1786378467.1472754144898 Content-Type: text/html; charset=UTF8 Content-Transfer-Encoding: quoted-printable
I don't to join = the third stream.

And Yes,=C2=A0This is what I was thinking of.also :=C2=A0
<= /span>s1.union(s2).keyBy().window().apply(// = outerjoin).keyBy.flatMap(// backup join)


I am already done integrating with Cassandra but I feel RocksDB = will be a better option, I will have to take care of the clearing part as y= ou have suggested, will check that in documentation.

I have the DTO with almost 50 fields , converting it to JSON and st= oring it as a state should not be a problem , or there is no harm in storin= g the DTO ?

I think the documentation should = specify the point that the state will be maintained for user-defined operat= ors to avoid confusion.

Rega= rds,
Vinay Patil

On Thu, Sep 1, 2016 at 1:12 PM, Fabian Huesk= e-2 [via Apache Flink User Mailing List archive.] <[hidden email]> wrote:
=
=09
I thought you would like to join the non-matched e= lements with another (third) stream.

--> s1.union(s2)= .keyBy().window().apply(// outerjoin).keyBy.connect(s3.keyBy).coF= latMap(// backup join)

If you want to match the non-match= ed stream with itself a FlatMapFunction is the right choice.

--> = s1.union(s2).keyBy().window().apply(// outerjoin).keyBy.flatMap(// bac= kup join)

The backup join puts all non-match elements in = the state and waits for another non-matched element with the same key to do= the join.

Best, Fabian



2016-09-01 19:55 GMT+02:00 vinay patil <[hidden email]>:
=
Yes, that's what I am looking for.
But why to use CoFlatMapFunction , I have already got the = matchingAndNonMatching Stream , by doing the union of two streams and havin= g the logic in apply method for performing outer-join.

=
I am thinking of applying the same key on matchingAndNonMatching and f= latmap to take care of rest logic.

Or are you sugg= estion to use Co-FlatMapFunction after the outer-join operation =C2=A0(I me= an after doing the window and getting=C2=A0matchingAndNonMatching stream )?=

Regards,
Vinay Pat= il

On Thu, Sep 1, 2016 at 11:38 AM, Fabia= n Hueske-2 [via Apache Flink User Mailing List archive.] = <[hidden email]> wrote:
=09
Thanks for the explanation. I think= I understood your usecase.

Yes, I'd go for the RocksDB ap= proach in a CoFlatMapFunction on a keyed stream (keyed by join key).
On= e input would be the unmatched outer join records, the other input would se= rve the events you want to match them with.
Retrieving elements fr= om RocksDB will be local and should be fast.

You sh= ould be confident though, that all unmatched record will be picked up at so= me point (RocksDB persists to disk, so you won't run out of memory but = snapshots size will increase).
The future state expiry featur= e will avoid such situations.

Best, Fabian

2016-09-01 18:29 GMT+02:00 vinay patil <[hidden email]>:
Hi Fabian,

I had already = used Co-Group function earlier but were getting some issues while dealing w= ith watermarks (for one use case I was not getting the correct result), so = I have used the union operator for performing the outer-join (WindowFunctio= n on a keyedStream), this approach is working correctly and giving me corre= ct results.

As I have discussed the scenario, I wa= nt to maintain the non-matching records in some store, so that's why I = was thinking of using RocksDB as a store here, where I will maintain the us= er-defined state =C2=A0after the outer-join window operator, and I can quer= y it using Flink to check if the value for a particular key is present or n= ot , if present I can match them and send it downstream.

The final goal is to have zero non-matching records, so this is the = backup plan to handle edge-case scenarios.

I have = already integrated code to write to Cassandra using Flink Connector, but I = think this will be a better option rather than hitting the query to externa= l store since RocksDb will store the data to local TM disk, the retrieval w= ill be faster here than Cassandra , right ?

W= hat do you think ?


Regards,
Vinay Patil

On Thu, Sep 1, 2016 at 10:19= AM, Fabian Hueske-2 [via Apache Flink User Mailing List archive.] <[hidde= n email]> wrote:
=09
Hi Vinay,

can you give= a bit more detail about how you plan to implement the outer join? Using a = WIndowFunction or a CoFlatMapFunction on a KeyedStream?

An alt= ernative could be to use a CoGroup operator which collects from two inputs = all elements that share a common key (the join key) and are in the same win= dow. The interface of the function provides two iterators over the elements= of both inputs and can be used to implement outer join functionality. The = benefit of working with a CoGroupFunction is that you do not have to take c= are of state handling at all.

In case you go for a custom imp= lementation you will need to work with operator state.
However, you do = not need to directly interact with RocksDB. Flink is taking care of that fo= r you.

Best, Fabian

2016-09-01 16:13 GMT+02:00 = vinay patil <[hidden email]>:
Hi Fabian/Stephan,

Waiting for your suggestion

Regards,
Vinay Patil=

On Wed, Aug 31, 2016 at 1:46 PM,= Vinay Patil <[hidden email]> wrote:
Hi Fabian/Stephan,

This makes things clea= r.

This is the use case I have :=C2=A0
I= am performing a outer join operation on the two streams (in window) after = which I get matchingAndNonMatchingStream, now I want to make sure that the = matching rate is high (matching cannot happen if one of the source is not e= mitting elements for certain time) , so to tackle this situation I was thin= king of using RocksDB as a state Backend, where I will insert the unmatched= records in it (key - will be same as used for window and value will be DTO= ), so before inserting into it I will check if it is already present in Ro= cksDB, if yes I will take the data from it and send it downstream (and ensu= re I perform the clean operation for that key).
(Also the data to= store should be encrypted, encryption part can be handled )

=
so instead of using Cassandra , Can I do this using RocksDB as s= tate backend since the state is not gone after checkpointing ?
P.S I have kept the watermark behind by 1500 secs just to be s= afe on handling late elements but to tackle edge case scenarios like the on= e mentioned above we are having a backup plan of using Cassandra as externa= l store since we are dealing with financial critical data.

Regards,
Vinay Patil=

On Wed, Aug 31, 2016 at 11:34 AM= , Fabian Hueske <[hidden email]> wrote:
Hi Vinaj,

if you use user-defined state, you have to manually clear it.
Otherwise, it will stay in the state backend (heap or RocksDB) until the job goes down (planned or due to an OOM error).

This is esp. important to keep in mind, when using keyed state.
If you have an unbounded, evolving key space you will likely run
out-of-memory.
The job will constantly add state for each new key but won't be able to=
clean up the state for "expired" keys.

You could implement a clean-up mechanism this if you implement a custom
stream operator.
However this is a very low level interface and requires solid understanding=
of the internals like timestamps, watermarks and the checkpointing
mechanism.

The community is currently working on a state expiry feature (state will be=
discarded if not requested or updated for x minutes).

Regarding the second question: Does state remain local after checkpointing?=
Yes, the local state is only copied to the remote FS (HDFS, S3, ...) but remains in the operator. So the state is not gone after a checkpoint is
completed.

Hope this helps,
Fabian

2016-08-31 18:17 GMT+02:00 Vinay Patil <[hidden email]>:

> Hi Stephan,
>
> Just wanted to jump into this discussion regarding state.
>
> So do you mean that if we maintain user-defined state (for non-window<= br> > operators), then if we do=C2=A0 not clear it explicitly will the data = for that
> key remains in RocksDB.
>
> What happens in case of checkpoint ? I read in the documentation that = after
> the checkpoint happens the rocksDB data is pushed to the desired locat= ion
> (hdfs or s3 or other fs), so for user-defined state does the data stil= l
> remain in RocksDB after checkpoint ?
>
> Correct me if I have misunderstood this concept
>
> For one of our use we were going for this, but since I read the above = part
> in documentation so we are going for Cassandra now (to store records a= nd
> query them for a special case)
>
>
>
>
>
> Regards,
> Vinay Patil
>
> On Wed, Aug 31, 2016 at 4:51 AM, Stephan Ewen <[hidden email]> wrote:
>
> > In streaming, memory is mainly needed for state (key/value state)= . The
> > exact representation depends on the chosen StateBackend.
> >
> > State is explicitly released: For windows, state is cleaned up > > automatically (firing / expiry), for user-defined state, keys hav= e to be
> > explicitly cleared (clear() method) or in the future will have th= e option
> > to expire.
> >
> > The heavy work horse for streaming state is currently RocksDB, wh= ich
> > internally uses native (off-heap) memory to keep the data.
> >
> > Does that help?
> >
> > Stephan
> >
> >
> > On Tue, Aug 30, 2016 at 11:52 PM, Roshan Naik <[hidden email]><= br> > > wrote:
> >
> > > As per the docs, in Batch mode, dynamic memory allocation is= avoided by
> > > storing messages being processed in ByteBuffers via Unsafe m= ethods.
> > >
> > > Couldn't find any docs=C2=A0 describing mem mgmt in Stre= amingn mode. So...
> > >
> > > - Am wondering if this is also the case with Streaming ?
> > >
> > > - If so, how does Flink detect that an object is no longer b= eing used
> and
> > > can be reclaimed for reuse once again ?
> > >
> > > -roshan
> > >
> >
>


=09 =09 =09

View this message in context: Re: Streaming - mem= ory management
Sent from the Ap= ache Flink User Mailing List archive. mailing list archive at Nabble.co= m.

=09 =09 =09 =09
=09
=09

=09
=09=09
If you reply to this email, your mess= age will be added to the discussion below:
=09=09
http://apache-flink-user-maili<= wbr>ng-list-archive.2336050.n4.nabble.com/Re-Streaming-memory-man= agement-tp8829p8832.html =09
=09
=09=09To start a new topic under Apache Flink User Mailing List archive., e= mail [hidden email]<= /a>
=09=09To unsubscribe from Apache Flink User Mailing List archive.,
click here.
=09=09= NAML =09

=09 =09 =09

View this message in context: Re: Streaming = - memory management
Sent from the Ap= ache Flink User Mailing List archive. mailing list archive at Nabble.co= m.

=09 =09 =09 =09
=09
=09
=09
=09=09
If you reply to this email, your mess= age will be added to the discussion below:
=09=09
http://apache-flink= -user-mailing-list-archive.2336050.n4.nabble.com/Re-Streaming-mem= ory-management-tp8829p8837.html =09
=09
=09=09To start a new topic under Apache Flink User Mailing List archive., e= mail [hidden email]<= /a>
=09=09To unsubscribe from Apache Flink User Mailing List archive.,
click here.
=09=09= NAML =09

<= div class=3D"h5">
=09 =09 =09

View this message in context: Re: Streaming = - memory management
Sent from the Ap= ache Flink User Mailing List archive. mailing list archive at Nabble.co= m.

=09 =09 =09 =09
=09
=09
=09
=09=09
If you reply to this email, your mess= age will be added to the discussion below:
=09=09
http://apache-flink-user-<= wbr>mailing-list-archive.2336050.n4.nabble.com/Re-Streaming-memor= y-management-tp8829p8843.html =09
=09
=09=09To start a new topic under Apache Flink User Mailing List archive., e= mail [hidden email]
=09=09To unsubscribe from Apache Flink User Mailing List archive., click here.<= br> =09=09= NAML =09

=09 =09 =09

View this message in context: Re: Streaming - memory management
Sent from the Apache Flink User Mailing List archive. mailing list ar= chive at Nabble.com.
------=_Part_110734_1786378467.1472754144898--