You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by tcostasouza <tc...@gmail.com> on 2015/06/19 00:04:05 UTC

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





--
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.

Re: Can not execute remotely deployed task

Posted by tcostasouza <tc...@gmail.com>.
Hi,

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

Thanks!



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

Re: Can not execute remotely deployed task

Posted by Yakov Zhdanov <yz...@apache.org>.
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 <tc...@gmail.com>:

> 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.
>