You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Nipun Udara <y....@gmail.com> on 2014/07/16 06:39:28 UTC

Running script asynchronously

Hi all

Is there a way to run script on hosts asynchronously instead of using

       client.runScriptOnNodesMatching(runningInGroup(group), script,
                  overrideCredentialsWith(creds));

I would be grateful if somebody can help me to clarify this.

Regards
Nipun Udara

Re: Running script asynchronously

Posted by Ignasi Barrera <na...@apache.org>.
The method returns a ListenableFuture you can use to add custom
callbacks. Take a look at the Guava wiki [1] explaining how it works
and to find some examples examples of how to use it.


[1] https://code.google.com/p/guava-libraries/wiki/ListenableFutureExplained

On 16 July 2014 21:01, Nipun Udara <y....@gmail.com> wrote:
> Hi all
>
> when we submit a job using submitScriptOnNode method how do we monitor the
> state of the job and how to find the execution has finished using jclouds. I
> would be grateful if somebody can clarify this.
>
> Regards.
> Nipun
>
>
> On Wed, Jul 16, 2014 at 1:03 PM, Ignasi Barrera <na...@apache.org> wrote:
>>
>> Hi Nipun,
>>
>> You can use the "submitScriptOnNode" method, which returns a Future, to do
>> that. It does not accept a predicate, so youl'll have to call it once for
>> each node in the group.
>>
>> HTH!
>>
>> I.
>>
>> El 16/07/2014 06:40, "Nipun Udara" <y....@gmail.com> escribió:
>>
>>> Hi all
>>>
>>> Is there a way to run script on hosts asynchronously instead of using
>>>
>>>        client.runScriptOnNodesMatching(runningInGroup(group), script,
>>>                   overrideCredentialsWith(creds));
>>>
>>> I would be grateful if somebody can help me to clarify this.
>>>
>>> Regards
>>> Nipun Udara
>>>
>
>
>
> --
> Nipun Udara
>
> Undergraduate
> Department of Computer Science & Engineering
> University of Moratuwa
> Sri Lanka
>

Re: Running script asynchronously

Posted by Nipun Udara <y....@gmail.com>.
Hi all

when we submit a job using submitScriptOnNode method how do we monitor the
state of the job and how to find the execution has finished using jclouds.
I would be grateful if somebody can clarify this.

Regards.
Nipun


On Wed, Jul 16, 2014 at 1:03 PM, Ignasi Barrera <na...@apache.org> wrote:

> Hi Nipun,
>
> You can use the "submitScriptOnNode" method, which returns a Future, to do
> that. It does not accept a predicate, so youl'll have to call it once for
> each node in the group.
>
> HTH!
>
> I.
> El 16/07/2014 06:40, "Nipun Udara" <y....@gmail.com> escribió:
>
> Hi all
>>
>> Is there a way to run script on hosts asynchronously instead of using
>>
>>        client.runScriptOnNodesMatching(runningInGroup(group), script,
>>                   overrideCredentialsWith(creds));
>>
>> I would be grateful if somebody can help me to clarify this.
>>
>> Regards
>> Nipun Udara
>>
>>


-- 
Nipun Udara

*Undergraduate*
*Department of Computer Science & Engineering*
*University of Moratuwa*
*Sri Lanka*

Re: Running script asynchronously

Posted by Ignasi Barrera <na...@apache.org>.
Hi Nipun,

You can use the "submitScriptOnNode" method, which returns a Future, to do
that. It does not accept a predicate, so youl'll have to call it once for
each node in the group.

HTH!

I.
El 16/07/2014 06:40, "Nipun Udara" <y....@gmail.com> escribió:

> Hi all
>
> Is there a way to run script on hosts asynchronously instead of using
>
>        client.runScriptOnNodesMatching(runningInGroup(group), script,
>                   overrideCredentialsWith(creds));
>
> I would be grateful if somebody can help me to clarify this.
>
> Regards
> Nipun Udara
>
>