I am trying to execute a compute task on the node where the data is located
following the example shown here -
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheAffinityExample.java#L84

I get an java.lang.ClassNotFoundException:
com.ignite.model.productdetails.ProductDetails though. The detailed
exception is listed here - http://pastebin.com/ijjvTBpj

Note that the code executes if not executed with
ignite.compute().affinityRun() and the ProductDetails class implements
Serializable.

What could be missing?

Another question I had about affinityRun was - how can I update a method
local variable in the IgniteRunnable.run() method? 

for e.g. 

private void updateColumnWithAffinity(UpdateTracker updateTracker,
Map.Entry<ColumnDependenciesVertex, RuntimeEdgeInfo> columnEntry) {
        for(Object key :
columnEntry.getValue().getUpdateInfo().getOutgoingDependencyValues()) {
            ignite.compute().affinityRun(productCache.getName(), key, () ->
{
               
                *//here's where the ClassNotFoundException occurs.*
                updateCacheEntry(columnEntry.getValue().getEdge(),
String.valueOf(key), productCache.localPeek(String.valueOf(key)));

                *//what would be implications of the below statement? Would
it perform the update even executing on the remote node?*
                updateTracker.addUpdate(new
UpdateTracker.ColumnUpdateInfo(columnEntry.getKey(),
                       
columnEntry.getValue().getEdge().getExpression().eval().doubleValue(),
outgoingDependencyValues));
            });
        }
    }

Let me know your thoughts. Thanks.





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/ClassNotFoundException-with-affinity-run-tp5359.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to