What is the precise definition of classes eligible for P2P-classloading?

classic Classic list List threaded Threaded
3 messages Options
DanieleBosetti DanieleBosetti
Reply | Threaded
Open this post in threaded view
|

What is the precise definition of classes eligible for P2P-classloading?

Hi,

I have enabled p2p classloading, and this works well when submitting compute
code, eg. IgniteCallable-s.
On the other hand, it seems that p2p-classloading does NOT import data
classes, is that right?
(So, I think I will put data classes on the servers.)

Regarding classes that are indeed p2p-classloaded- how does that work
exactly?
I mean, does Ignite only p2p-load classes if they extend IgniteCallable (or
other ignite "lang" interfaces)? Or, what is the property that enables a
class to be eligible for p2p-loading?

Thanks,
(love the platform!)



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
dkarachentsev dkarachentsev
Reply | Threaded
Open this post in threaded view
|

Re: What is the precise definition of classes eligible for P2P-classloading?

Hi,

There are no such limitations on peer class loading, but it was designed and
works for compute jobs, remote filters or queries only. All unknown classes
from tasks or queries will be deployed in cluster with dependencies
according to deployment mode [1]. Actually with job Ignite sends deployment
that is used to deploy all required classes.

[1]
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/DeploymentMode.html

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
DanieleBosetti DanieleBosetti
Reply | Threaded
Open this post in threaded view
|

Re: What is the precise definition of classes eligible for P2P-classloading?

Hi Dmirty,
thanks for replying.

I just realized that the p2p-classloading will behave differently, if I
create a remote filter using these two alternatives:
      qry.setRemoteFilterFactory( new MyRemoteFilterFactory() );
      qry.setRemoteFilterFactory(FactoryBuilder.factoryOf(
MyEntryEventFilter.class ));

(the MyRemoteFilterFactory class depends on the MyEntryEventFilter class.)

In the first case, the server p2p-loads the MyEntryEventFilter class. In the
second case, it doesn't; and when registering, will have a
ClassNotFoundException on the server side.

I understand that is related to the fact that using the javax builder we
lose some dependency information?

(altough this makes sense, it is easy to get confused- at least for me!)




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