The DataStreamer is unordered.   If you have  duplicate keys with different
values, and you don't flush or take other action, then you will get an
arbitrary result.   AllowOverwrite is not a solution.

Adding to the streamer returns a Future, and all of those futures are
notified when the buffer is committed.,

You can keep a map by key of those futures if the source is a single
client, and delay subsequent updates until the first completes.   You could
discard more than one duplicate.

What we do is have a version # that we store in the value, and the
StreamReceiver ignores earlier versions.
-DH

On Wed, Aug 29, 2018 at 8:08 AM, Вячеслав Коптилин <[email protected]
> wrote:

> Hello,
>
> I don't think there is a way to do that check. Moreover, it seems to me
> that is useless in any case.
> The thing that allows you to achieve the desired behavior is
> `allowOverwrite` flag [1].
> By default, the data streamer will not overwrite existing data, which
> means that if it will encounter an entry that is already in cache, it will
> skip it.
> So, you can just set `allowOverride` to `false` (which is the default
> value) and put updated values into a cache.
>
> [1] https://apacheignite.readme.io/docs/data-streamers#
> section-allow-overwrite
>
> Thanks,
> S.
>
> ср, 29 авг. 2018 г. в 8:32, the_palakkaran <[email protected]>:
>
>> Hi,
>>
>> I have a data streamer to load data into a cache. While loading I might
>> need
>> to update value of a particular key in cache, so I need to check if it is
>> already there in the streamer buffer. If so, either I need to update value
>> against that key in the buffer or I need to flush the data in the streamer
>> and then update. Is there a way to do this?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast Ltd, an innovator in Software as a Service 
(SaaS) for business. Providing a safer and more useful place for your human 
generated data. Specializing in; Security, archiving and compliance. To find 
out more visit the Mimecast website.

Reply via email to