Re: What should I take care if I enable object reuse

2019-03-17 Thread yinhua.dai
Get it, thanks guys -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: What should I take care if I enable object reuse

2019-03-15 Thread Elias Levy
That's certainly the safe thing to do, but if you do not mutate the object, a copy is not strictly necessary. On Thu, Mar 14, 2019 at 9:19 PM Kurt Young wrote: > Keep one thing in mind: if you want the element remains legal after the > function call ends (maybe map(), flatmap(), depends on

Re: What should I take care if I enable object reuse

2019-03-14 Thread Kurt Young
Keep one thing in mind: if you want the element remains legal after the function call ends (maybe map(), flatmap(), depends on what you are using), you should copy the elements. Typical scenarios includes: 1. Save the elements into some collection like array, list, map for later usage, you should

Re: What should I take care if I enable object reuse

2019-03-14 Thread yinhua.dai
Hi Elias, Thanks. Would it be good enough as long as we use always use different object when call the Collector.collect() method in the operator? -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

What should I take care if I enable object reuse

2019-03-13 Thread yinhua.dai
Hi Community, I saw from the document that we need to be careful about enable the object reuse feature. So which part should I check to avoid any issues? Can any one help to summarize? Thank you. // *enableObjectReuse() / disableObjectReuse()* By default, objects are not reused in Flink.