gridgain - primaryValues behave not as expected -


in our poc, have cache in partioned mode, 2 backups, , started 3 nodes. 100 entries loaded cache , did below steps retrive it.

public void  perform () throws gridexception {          final  gridcache<long, entity> cache= g.cache("cache");          gridprojection proj= g.forcache("cache");           collection< collection<entity>> list= proj .compute().broadcast(                  new gridcallable< collection<entity>>() {              @override public collection<entity> call() throws exception {                   collection<entity> values= cache.primaryvalues();                   system.out.println("list size on each node: "+ values.size());                    // console each node shows 28,38,34 respectively, correct                   return values;              }          }).get();          (collection<entity> e: list){            system.out.println("list size when arrives on main node :"+ e.size()); //console shows 28 3 times, not correct        } } 

i assume primaryvalues() take value of each element returned primaryentryset() out , put collection. tried use primaryentryset , works without such problem.

the way gridgain serializes cache collections reference may not intuitive. have filed jira issue apache ignite project (which next version of gridgain open source edition): https://issues.apache.org/jira/browse/ignite-38

in mean time, please try following gridcallable, should work:

return new arraylist(cache.primaryvalues()); 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -