ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pragmaticbigdata <amits...@gmail.com>
Subject Iterating through a BinaryObject cache fails
Date Fri, 01 Jul 2016 08:39:18 GMT
I am using ignite version 1.6 and I have a replicated cache of <String,
BinaryObject> pre-loaded. In order to try out the dynamic structure change
ability with BinaryObjects, I tried iterating through the cache with
different approaches. All of them fail with an error 

Caused by: class org.apache.ignite.IgniteCheckedException: Class definition
was not found at marshaller cache and local file. 

Iterator Approach

        IgniteCache<String, BinaryObject> cache =

        Iterator<Cache.Entry&lt;String, BinaryObject>> iterator =
        while (iterator.hasNext()) {



        cache.forEach(entry -> {
            BinaryObjectBuilder builder = entry.getValue().toBuilder();
            builder.setField(fieldToBeAdded, 0);
            updatedCache.put(entry.getKey(), builder.build());


Query Approach

        SqlQuery<String, BinaryObject> query = new SqlQuery<String,
BinaryObject>(table.getCacheValueType(), "CUSTOMER <> 'X'");
        try(QueryCursor<Cache.Entry&lt;String, BinaryObject>> cursor =
cache.query(query)) {
            logger.info("No of entries : {}", cursor.getAll().size());


The error trace is  here <http://pastebin.com/AV6kd2Ka>  

If I tried to query specific objects I am able to do it with the query
approach but iterating through all the elements of the cache is failing.

What am I missing?


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Iterating-through-a-BinaryObject-cache-fails-tp6038.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message