You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by gunman524 <gu...@126.com> on 2017/11/16 02:39:35 UTC

Apache Ignite binary type invalidation

I've createted the binary type with the name 'someField' and the field type
is "String".
Now I want to change it from string to int. But I don't want to change the
name of the type, but I got an exception while cache populating:

javax.cache.CacheException:class 
org.apache.ignite.binary.Binary0bjectException:Binary type has different
field
types[typeName=com.xxx.service.ignite.vo.AnnounceProjectVO,fieldName=announceld,fieldTypeNamel=long,fieldTypeName2=String]

I tried to destroy the original cache, but does not work. Looks the meta
data had be cached, can it be refresh?

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Apache Ignite binary type invalidation

Posted by gunman524 <gu...@126.com>.
Alexey, that's cool. I'll try it out



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Apache Ignite binary type invalidation

Posted by Alexey Kukushkin <ku...@gmail.com>.
Hi,

Ignite really caches metadata but restarting cluster clears the cache.

If you want to change field type at runtime (without restarting the
cluster), then you need to first remove field and then add the field
something like:

BinaryObject o = binary.builder("MyType").removeField("f").build();
o = o.toBuilder().setField("f", 10000, Integer.class);