Can not execute remotely deployed task

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

Can not execute remotely deployed task

Hello,

I've been trying to run a remotely deployed task. There is a cluster of workers started as follow:

         Ignite ignite = Ignition.start();
         // TestTask is annotated with @ComputeTaskName("test")
         ignite.compute().localDeployTask(TestTask.class, TestTask.class.getClassLoader());

Now, from another instance there is:

        Ignite ignite = Ignition.start();
        ignite.compute(ignite.cluster().forRemotes()).execute("test", 10);

But after running the last snippet I get the following exception:

Caused by: class org.apache.ignite.internal.IgniteDeploymentCheckedException: Unknown task name or failed to auto-deploy task (was task (re|un)deployed?) [taskName=test, dep=LocalDeployment [super=GridDeployment [ts=1434664677854, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@4d7e1886, clsLdrId=4d1bda80e41-a3d4e1c8-3a48-4701-bd64-cc42d1f73765, userVer=0, loc=true, sampleClsName=java.lang.String, pendingUndeploy=false, undeployed=false, usage=0]]]
        at org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:462)
        at org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:388)
        at org.apache.ignite.internal.IgniteComputeImpl.execute(IgniteComputeImpl.java:131)
        ... 6 more

Shouldn't this be supported? What am I missing?

Regards,
Thiago Souza

yakov yakov
Reply | Threaded
Open this post in threaded view
|

Re: Can not execute remotely deployed task

Task has been deployed locally. You can run task by name on the node it has been deployed on. 

Your use case is supported with UriDeploymentSpi. In this case you can put your jar to HTTP or FTP server and all nodes will detect that and deploy the content. Then you can run tasks by name on any node. Please take a look at this.

--Yakov

2015-06-19 1:04 GMT+03:00 tcostasouza <[hidden email]>:
Hello,

I've been trying to run a remotely deployed task. There is a cluster of
workers started as follow:

         Ignite ignite = Ignition.start();
         // TestTask is annotated with @ComputeTaskName("test")
         ignite.compute().localDeployTask(TestTask.class,
TestTask.class.getClassLoader());

Now, from another instance there is:

        Ignite ignite = Ignition.start();
        ignite.compute(ignite.cluster().forRemotes()).execute("test", 10);

But after running the last snippet I get the following exception:

Caused by: class
org.apache.ignite.internal.IgniteDeploymentCheckedException: Unknown task
name or failed to auto-deploy task (was task (re|un)deployed?)
[taskName=test, dep=LocalDeployment [super=GridDeployment [ts=1434664677854,
depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@4d7e1886,
clsLdrId=4d1bda80e41-a3d4e1c8-3a48-4701-bd64-cc42d1f73765, userVer=0,
loc=true, sampleClsName=java.lang.String, pendingUndeploy=false,
undeployed=false, usage=0]]]
        at
org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:462)
        at
org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:388)
        at
org.apache.ignite.internal.IgniteComputeImpl.execute(IgniteComputeImpl.java:131)
        ... 6 more

Shouldn't this be supported? What am I missing?

Regards,
Thiago Souza





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Can-not-execute-remotely-deployed-task-tp537.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

tcostasouza tcostasouza
Reply | Threaded
Open this post in threaded view
|

Re: Can not execute remotely deployed task

Hi,

Ok! Thanks for the clarifications! I'll explore this UriDeploymentSpi.

Thanks!