Hey Ilya,

I think for the second part of the question, you can look at spillable data
structures for examples on how to use managed state
org.apache.apex.malhar.lib.state.spillable.Spillable*

Regarding the first part, from what I know and remember, it is not thread
safe, but I can't say with authority. It is meant to be used by separate
partitions if parallelism is needed. As you know within an operator all the
api methods are guaranteed to be called from a single thread and will not
be executing concurrently. If you run your own threads in the operator then
yes all bets are off.

Thanks

On Mon, May 8, 2017 at 11:19 AM, Ganelin, Ilya <ilya.gane...@capitalone.com>
wrote:

> Bump, any thoughts on this? Cheers.
>
>
>
> - Ilya Ganelin
>
> [image: id:image001.png@01D1F7A4.F3D42980]
>
>
>
> *From: *"Ganelin, Ilya" <ilya.gane...@capitalone.com>
> *Reply-To: *"users@apex.apache.org" <users@apex.apache.org>
> *Date: *Wednesday, May 3, 2017 at 11:10 AM
> *To: *"users@apex.apache.org" <users@apex.apache.org>
> *Subject: *Managed State
>
>
>
> Hi, all – I’m interested in creating a data structure around managed state
> similar to this:
>
> https://gist.github.com/ilganeli/68636dbdfb50614d02b39c4fac4ae8a2
>
>
>
> I have a couple of questions in mind:
>
> 1)      Is the underlying implementation for Managed State thread safe?
>
> 2)      Is there any documentation around managed state outside of the
> JavaDocs? I’ve found some example test cases but additional docs would be
> helpful.
>
>
>
> - Ilya Ganelin
>
>
> ------------------------------
>
> The information contained in this e-mail is confidential and/or
> proprietary to Capital One and/or its affiliates and may only be used
> solely in performance of work or services for Capital One. The information
> transmitted herewith is intended only for use by the individual or entity
> to which it is addressed. If the reader of this message is not the intended
> recipient, you are hereby notified that any review, retransmission,
> dissemination, distribution, copying or other use of, or taking of any
> action in reliance upon this information is strictly prohibited. If you
> have received this communication in error, please contact the sender and
> delete the material from your computer.
>
> ------------------------------
>
> The information contained in this e-mail is confidential and/or
> proprietary to Capital One and/or its affiliates and may only be used
> solely in performance of work or services for Capital One. The information
> transmitted herewith is intended only for use by the individual or entity
> to which it is addressed. If the reader of this message is not the intended
> recipient, you are hereby notified that any review, retransmission,
> dissemination, distribution, copying or other use of, or taking of any
> action in reliance upon this information is strictly prohibited. If you
> have received this communication in error, please contact the sender and
> delete the material from your computer.
>

Reply via email to