You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Kasnacheev (JIRA)" <ji...@apache.org> on 2017/10/31 17:12:00 UTC

[jira] [Created] (IGNITE-6803) UriDeploymentSpi affects execution of other tasks, including Ignite internals

Ilya Kasnacheev created IGNITE-6803:
---------------------------------------

             Summary: UriDeploymentSpi affects execution of other tasks, including Ignite internals
                 Key: IGNITE-6803
                 URL: https://issues.apache.org/jira/browse/IGNITE-6803
             Project: Ignite
          Issue Type: Bug
      Security Level: Public (Viewable by anyone)
    Affects Versions: 2.2
            Reporter: Ilya Kasnacheev


From the maillist:
http://apache-ignite-users.70518.x6.nabble.com/Code-deployment-throught-UriDeploumentSpi-tt17807.html

In our project we need to deploy custom compute tasks into cluster without cluster restart and p2p class loading.  
I try to use org.apache.ignite.spi.deployment.uri.UriDeploumentSpi for that purpose, but I have a problem.

I have simple Ignite Service and Ignite Compute Task which use it throught @ServiceResource.
This ComputeTask located into .gar file which was deployed via UriDeploumentSpi.

If I have service implementation on each node(node singleton service) then it works great. 
But if I deploy service as a cluster singleton then task executes correctly only on node with this service. 

On other nodes @ServiceResource returns ServiceProxy that throws exception on service remote method invokation (lambda with service call cannot be deployed):

{code}
SEVERE: Failed to execute job [jobId=68a96d76f51-7919c34c-9a48-4068-bcd6-70dad5595e86, ses=GridJobSessionImpl [ses=GridTaskSessionImpl [taskName=task-one, dep=GridDeployment [ts=1509275650885, depMode=SHARED, clsLdr=GridUriDeploymentClassLoader [urls=[file:/C:/IdeaProjects/dmp_code_deployment/test/out/deployment/gg.uri.deployment.tmp/428ec712-e6d0-4eab-97f9-ce58d7b3e0f5/dirzip_task-one6814855127293591501.gar/]], clsLdrId=7eb15d76f51-428ec712-e6d0-4eab-97f9-ce58d7b3e0f5, userVer=0, loc=true, sampleClsName=com.gridfore.tfedyanin.deploy.Task1, pendingUndeploy=false, undeployed=false, usage=1], taskClsName=com.gridfore.tfedyanin.deploy.Task1, sesId=38a96d76f51-7919c34c-9a48-4068-bcd6-70dad5595e86, startTime=1509275650601, endTime=9223372036854775807, taskNodeId=7919c34c-9a48-4068-bcd6-70dad5595e86, clsLdr=GridUriDeploymentClassLoader [urls=[file:/C:/IdeaProjects/dmp_code_deployment/test/out/deployment/gg.uri.deployment.tmp/428ec712-e6d0-4eab-97f9-ce58d7b3e0f5/dirzip_task-one6814855127293591501.gar/]], closed=false, cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=false, internal=false, subjId=7919c34c-9a48-4068-bcd6-70dad5595e86, mapFut=IgniteFuture [orig=GridFutureAdapter [ignoreInterrupts=false, state=INIT, res=null, hash=1254296516]], execName=null], jobId=68a96d76f51-7919c34c-9a48-4068-bcd6-70dad5595e86]]
class org.apache.ignite.IgniteDeploymentException: Failed to auto-deploy task (was task (re|un)deployed?): class org.apache.ignite.internal.processors.service.GridServiceProcessor$ServiceTopologyCallable
{code}

Problem works as follows:
- Ignite has to determine which node has deployed service, by name.
- Ignite has to send ServiceTopologyCallable task.
- Ignite tries to deploy ServiceTopologyCallable task using UriDeploymentSpi.
- UriDeploymentSpi doesn't have it obviously, but it also tries to fallback towards "CLASS" loading from local ClassLoader
- Which fails because it is told that ServiceTopologyCallable comes from its classloader and not from the local one!

So I'm at loss where it should be fixed properly. It is also sad that we are using all that deploy pipeline to handle IgniteInternal tasks, but there obviously are non-internal local tasks which might be affected by same problem.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)