Pierre,
Anyway to reconcile the annotation declaration with the variable registry on
the instance? That way a reasonable default could be declared in the
annotation, but it could also be overridden by a configured value in the
running NiFi instance. For example, I like my GenerateFlowFile processors to
run on a 3 sec schedule when I’m debugging a flow in my development
environment. I could set a variable on the root PG to “schedule.debug” or
“component.schedule.default” to “3 secs” and the annotation could read (in
order) — “${component.schedule.default}, 1 sec” (the second being a literal
value in the annotation) when being instantiated.This would allow instance admins (either developers or actual admins in a deployed MTA environment) to set reasonable defaults and offload that responsibility from the users at a more granular level than the core developers making the final decisions when writing the code. Andy LoPresto [email protected] [email protected] PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > On Apr 26, 2018, at 8:26 AM, Ryan H <[email protected]> wrote: > > +1 on this idea. We were considering doing this as well as we have ran into > issues with the system getting borked because of users unknowingly doing the > same with items such as GenerateFlowFile and some others. I think its a great > idea! > > > Cheers, > > Ryan H > > On Thu, Apr 26, 2018 at 8:14 AM, Pierre Villard <[email protected] > <mailto:[email protected]>> wrote: > Actually the InvokeHTTP is a special case because it can accept incoming > relationship... so setting a default like 1s could be unwanted for some > users... but I think it'd be less risky to have a default of 1s that people > can change rather than keeping 0s as default and having the risk of harming > the remote system... > > 2018-04-26 13:24 GMT+02:00 Jorge Castellote <[email protected] > <mailto:[email protected]>>: > Looks like a great idea to me as well. > > > //Jorge > From: Otto Fowler <[email protected] <mailto:[email protected]>> > Sent: Thursday, April 26, 2018 12:55:47 PM > To: Pierre Villard; [email protected] <mailto:[email protected]> > Subject: Re: Default scheduling > > I think this is a great idea. I have done this myself with a ‘metered’ api > using the AWS Web Gateway Api version of InvokeHttp ( > https://github.com/apache/nifi/pull/2588 > <https://github.com/apache/nifi/pull/2588> shameless plug ). > I can’t think of how 0s would ever be a sane default. > > > On April 26, 2018 at 04:18:04, Pierre Villard ([email protected] > <mailto:[email protected]>) wrote: > >> Hi there, >> >> Since few versions already, it's now possible to define default values for >> scheduling of the components using a dedicated annotation. Example >> >> @DefaultSchedule(strategy = SchedulingStrategy.TIMER_DRIVEN, period = "1 >> min") >> >> I'm wondering if the community would be OK about setting a default >> scheduling for the "Input" processors (where incoming relationship is >> forbidden). >> >> My point is: I see inexperienced users starting processors that should not >> run with the default scheduling of 0s (because they just forget about this >> setting). Problem is that for some processors this could harm the remote >> system the processor is connected to. >> >> One recent example I saw (even though it's not an "input" processor) is with >> InvokeHTTP: if we forget to change the scheduling, it'll send thousands of >> requests to the remote service and could have negative impact on it. >> >> Thoughts? > >
signature.asc
Description: Message signed with OpenPGP using GPGMail
