You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Lokesh Sharma <lo...@gmail.com> on 2018/09/05 14:31:40 UTC
Execute IgniteRunnable in all Ignite nodes?
During some events I want to run a piece of code at all nodes of Ignite. Is
it possible? I know, its possible to run a Runnable in exactly any one of
the nodes using
exec.submit(new IgniteRunnable() {
@Override public void run() {
System.out.println(">>> Printing '" + word + "' on this node
from grid job.");
}
});
So, I was wondering if there's something like "exec.runAll" that would run
the IgniteRunnable in all instances?
Re: Execute IgniteRunnable in all Ignite nodes?
Posted by Lokesh Sharma <lo...@gmail.com>.
Many thanks!
On Wed, Sep 5, 2018, 8:08 PM Ilya Kasnacheev <il...@gmail.com>
wrote:
> Hello!
>
> ignite.compute().broadcast() should do.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> ср, 5 сент. 2018 г. в 17:31, Lokesh Sharma <lo...@gmail.com>:
>
>> During some events I want to run a piece of code at all nodes of Ignite.
>> Is it possible? I know, its possible to run a Runnable in exactly any one
>> of the nodes using
>>
>> exec.submit(new IgniteRunnable() {
>> @Override public void run() {
>> System.out.println(">>> Printing '" + word + "' on this node from grid job.");
>> }
>> });
>>
>>
>> So, I was wondering if there's something like "exec.runAll" that would
>> run the IgniteRunnable in all instances?
>>
>
Re: Execute IgniteRunnable in all Ignite nodes?
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
ignite.compute().broadcast() should do.
Regards,
--
Ilya Kasnacheev
ср, 5 сент. 2018 г. в 17:31, Lokesh Sharma <lo...@gmail.com>:
> During some events I want to run a piece of code at all nodes of Ignite.
> Is it possible? I know, its possible to run a Runnable in exactly any one
> of the nodes using
>
> exec.submit(new IgniteRunnable() {
> @Override public void run() {
> System.out.println(">>> Printing '" + word + "' on this node from grid job.");
> }
> });
>
>
> So, I was wondering if there's something like "exec.runAll" that would run
> the IgniteRunnable in all instances?
>