You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Paolo Di Tommaso <pa...@gmail.com> on 2016/01/20 16:26:52 UTC

Cron job

Hi there,

Is there a way to deploy a cron task in each grid node and periodically set
an attribute in the ClusterNode structure?

Any suggestion?


Thanks a lot
Paolo

Re: Cron job

Posted by vkulichenko <va...@gmail.com>.
Actually, IgniteScheduler API is still available [1]. I tend to agree that
it's not very useful, but it's definitely not dumped :)

[1]
https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/IgniteScheduler.java

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cron-job-tp2656p2664.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cron job

Posted by Paolo Di Tommaso <pa...@gmail.com>.
It sounds OK.

Thanks, Paolo

On Wed, Jan 20, 2016 at 9:50 PM, Dmitriy Setrakyan <ds...@apache.org>
wrote:

>
> On Wed, Jan 20, 2016 at 12:30 PM, Paolo Di Tommaso <
> paolo.ditommaso@gmail.com> wrote:
>
>> Hi Dmitriy,
>>
>> Thank a lot for your tip. Does Ignite provide any built-in mechanism to
>> periodically execute a task on grid nodes or I can simply use a Java
>> ScheduledExecutorService or even a Timer class?
>>
>
> Paolo, we used to provide it and then dumped it, because, as you
> suggested, Java already has necessary support for it with
> ScheduledExecutorService and Timer classes.
>
>
>>
>> Cheers,
>> Paolo
>>
>>
>> On Wed, Jan 20, 2016 at 8:53 PM, Dmitriy Setrakyan <dsetrakyan@apache.org
>> > wrote:
>>
>>> Hi Paolo,
>>>
>>> You can definitely deploy a cron task that will periodically execute a
>>> task on top of Ignite. However, node attributes are static and get assigned
>>> on startup, so I don’t think you will be able to change them.
>>>
>>> Instead, I would suggest to create a small cache using node ID as a key
>>> and attributes as values. This way you will be able to update this cache
>>> dynamically from your task.
>>>
>>> Let us know if you have more questions.
>>>
>>> D.
>>>
>>> On Wed, Jan 20, 2016 at 7:26 AM, Paolo Di Tommaso <
>>> paolo.ditommaso@gmail.com> wrote:
>>>
>>>> Hi there,
>>>>
>>>> Is there a way to deploy a cron task in each grid node and periodically
>>>> set an attribute in the ClusterNode structure?
>>>>
>>>> Any suggestion?
>>>>
>>>>
>>>> Thanks a lot
>>>> Paolo
>>>>
>>>>
>>>
>>
>

Re: Cron job

Posted by Dmitriy Setrakyan <ds...@apache.org>.
On Wed, Jan 20, 2016 at 12:30 PM, Paolo Di Tommaso <
paolo.ditommaso@gmail.com> wrote:

> Hi Dmitriy,
>
> Thank a lot for your tip. Does Ignite provide any built-in mechanism to
> periodically execute a task on grid nodes or I can simply use a Java
> ScheduledExecutorService or even a Timer class?
>

Paolo, we used to provide it and then dumped it, because, as you suggested,
Java already has necessary support for it with ScheduledExecutorService and
Timer classes.


>
> Cheers,
> Paolo
>
>
> On Wed, Jan 20, 2016 at 8:53 PM, Dmitriy Setrakyan <ds...@apache.org>
> wrote:
>
>> Hi Paolo,
>>
>> You can definitely deploy a cron task that will periodically execute a
>> task on top of Ignite. However, node attributes are static and get assigned
>> on startup, so I don’t think you will be able to change them.
>>
>> Instead, I would suggest to create a small cache using node ID as a key
>> and attributes as values. This way you will be able to update this cache
>> dynamically from your task.
>>
>> Let us know if you have more questions.
>>
>> D.
>>
>> On Wed, Jan 20, 2016 at 7:26 AM, Paolo Di Tommaso <
>> paolo.ditommaso@gmail.com> wrote:
>>
>>> Hi there,
>>>
>>> Is there a way to deploy a cron task in each grid node and periodically
>>> set an attribute in the ClusterNode structure?
>>>
>>> Any suggestion?
>>>
>>>
>>> Thanks a lot
>>> Paolo
>>>
>>>
>>
>

Re: Cron job

Posted by Paolo Di Tommaso <pa...@gmail.com>.
Hi Dmitriy,

Thank a lot for your tip. Does Ignite provide any built-in mechanism to
periodically execute a task on grid nodes or I can simply use a Java
ScheduledExecutorService or even a Timer class?


Cheers,
Paolo


On Wed, Jan 20, 2016 at 8:53 PM, Dmitriy Setrakyan <ds...@apache.org>
wrote:

> Hi Paolo,
>
> You can definitely deploy a cron task that will periodically execute a
> task on top of Ignite. However, node attributes are static and get assigned
> on startup, so I don’t think you will be able to change them.
>
> Instead, I would suggest to create a small cache using node ID as a key
> and attributes as values. This way you will be able to update this cache
> dynamically from your task.
>
> Let us know if you have more questions.
>
> D.
>
> On Wed, Jan 20, 2016 at 7:26 AM, Paolo Di Tommaso <
> paolo.ditommaso@gmail.com> wrote:
>
>> Hi there,
>>
>> Is there a way to deploy a cron task in each grid node and periodically
>> set an attribute in the ClusterNode structure?
>>
>> Any suggestion?
>>
>>
>> Thanks a lot
>> Paolo
>>
>>
>

Re: Cron job

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Hi Paolo,

You can definitely deploy a cron task that will periodically execute a task
on top of Ignite. However, node attributes are static and get assigned on
startup, so I don’t think you will be able to change them.

Instead, I would suggest to create a small cache using node ID as a key and
attributes as values. This way you will be able to update this cache
dynamically from your task.

Let us know if you have more questions.

D.

On Wed, Jan 20, 2016 at 7:26 AM, Paolo Di Tommaso <paolo.ditommaso@gmail.com
> wrote:

> Hi there,
>
> Is there a way to deploy a cron task in each grid node and periodically
> set an attribute in the ClusterNode structure?
>
> Any suggestion?
>
>
> Thanks a lot
> Paolo
>
>