Hi Oli,

you can change the scheduling of an existing job using scheduler:schedule with new period.

For convenience, I can add a scheduler:change command to update an existing job.

Regards
JB

On 11/16/2017 03:40 PM, Oliver Wulff wrote:
Hi JB


I can update the annotation to a period of 60 seconds for my custom collector but I can't for the jmx collector. At the moment, our elasticsearch cluster gets 6 times more data from the jmx collector because I don't know how to update the scheduler period for it.


When I check the list, I also don't know what each scheduler is exactly doing:


karaf@karaf()> scheduler:list
Name                       | Schedule
----------------------------------------------------------------------
decanter-collector-jmx.801 | at(2017-11-13T15:06:57.138+01:00, -1, 10)
decanter-collector-jmx.803 | at(2017-11-13T15:06:57.154+01:00, -1, 10)
decanter-collector-jmx.804 | at(2017-11-13T15:06:57.154+01:00, -1, 10)
decanter-collector-jmx.802 | at(2017-11-13T15:06:57.154+01:00, -1, 10)

Thanks

Oli

--------------------------------------------------------------------------------
*Von:* Oliver Wulff <[email protected]>
*Gesendet:* Mittwoch, 15. November 2017 16:52:29
*An:* [email protected]
*Betreff:* AW: Update Karaf Scheduler and custom Decanter Collector

Hi JB


Yes, I meant the user guide.


If I want to manage the scheduler I have to pass a script. What kind of script shall I use? Right now, I just see the name "decanter-collector-sl.474" where the prefix is used from the configured scheduler name (annotation).


But I'd like to manage the interval via configuration and thought this should 
work:

config:edit org.myown.karaf.decanter.collector.sl
config:property-set decanter.collector.name serviceLocator
config:property-set scheduler.period 60
config:property-set scheduler.concurrent false
config:property-set scheduler.name decanter-collector-sl
config:update


But the above commands disable the scheduler and I don't know why.


How can I update the period either via scheduler command and via configuration 
file?


Thanks

Oli

--------------------------------------------------------------------------------
*Von:* Jean-Baptiste Onofré <[email protected]>
*Gesendet:* Mittwoch, 15. November 2017 12:11:55
*An:* [email protected]
*Betreff:* Re: Update Karaf Scheduler and custom Decanter Collector
By the way, that's service properties for the config. You can change using the
scheduler command too.

I will update the user guide about that.

Regards
JB

On 11/15/2017 12:01 PM, Oliver Wulff wrote:
Hi all


Similar to the JMX Collector I've created my own collector but wanted to update
the default intervall from 10seconds to 60 seconds.


As soon as I create the configuration with the matching PID (org.myown.karaf.decanter.collector.sl), the scheduler is removed and not shown in "scheduler:list" anymore.


@Component(
//name = "org.myown.karaf.decanter.collector.sl",
      immediate = true,
      property = { "decanter.collector.name=serviceLocator",
              "scheduler.period:Long=10",
              "scheduler.concurrent:Boolean=false",
              "scheduler.name=decanter-collector-sl"}
)
public class ServiceLocatorCollector implements Runnable {

config:edit org.myown.karaf.decanter.collector.sl

config:property-set decanter.collector.name serviceLocator
config:property-set scheduler.period 60
config:property-set scheduler.concurrent false
config:property-set scheduler.name decanter-collector-sl
config:update


Unfortunately, the wiki page is not yet updated how to manage scheduling in Decanter.


What am I doing wrong?


Thanks

Oli



--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to