Thanks Val, I fixed this issue by implement interface Binarylizable.
-邮件原件-
发件人: vkulichenko [mailto:valentin.kuliche...@gmail.com]
发送时间: 2017年1月12日 13:31
收件人: user@ignite.apache.org
主题: RE: Efficient way to get partial data of a cache entry
RoaringBitmap is Externalizable with custom
RoaringBitmap is Externalizable with custom serialization logic, therefore
can't be represented as BinaryObject. In such cases toBinary() method return
the original object without changes.
-Val
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Efficient-way-to-get
Hi,
Exception in thread "main" java.lang.ClassCastException:
org.roaringbitmap.RoaringBitmap cannot be cast to
org.apache.ignite.binary.BinaryObject
You can easily reproduce this issue:
public static void main(String[] args)
{
//start your ignite before ...
RoaringBitmap bitmap
I would suggest calling cache.invoke() and return needed result without
altering the entry.
Or compute.affinityCall() and do local get inside callable and computing
and returning the result.
Hi Shawn,
#1 way is most unefficient way to get entry by the known key, due to SQL
parsing and planning overhead.
#2 way can cause unwanted deserialization in case of big value objects.
#3 way look like the most efficient way if you need the only field or few
fields of big value object.
Probably 1 and 3 would be the most effective ways if you're getting objects
on affinity node [1], not use CacheMemoryMode#OFFHEAP_VALUES mode and
CacheConfiguration.setCopyOnRead() is set to false (for query also with
Query.setLocal() set to true).
But copyOnRead = false flag could be the cause of