Hi experts,
I try to update cache by delta by calling invoke. This is the code, it is
terribly slow and run out of Memory and no cache updated. Please help.
table.getRows().forEach(r -> cache.invoke(r.getKey(), (entry, args) ->
{
BinaryObject bo = entry.getValue();
if (bo == null)
{
BinaryObjectBuilder builder =
IgniteManager.getIgnite().binary().builder(cacheName);
builder.setField("site", r.getSite());
...
bo = builder.build();
}
BinaryObjectBuilder builder = bo.toBuilder();
for (String measName : table.getSchema().getMeasNames())
{
String measValue = r.getMeasValue(table.getSchema(),
measName);
if (measValue != null)
{
builder.setField(measName, measValue);
}
}
return null;
}));
Thanks
Shawn