Re: Re: Re: Re: Discussion about https://github.com/apache/pulsar/pull/11112

2021-07-09 Thread Jerry Peng
Hi Everyone, Some of my thoughts: 1. If we are going to introduce new methods or stages in the lifecycle of a function such as "open" and "close", I would recommend we follow what we already have for Pulsar IO sources and Sink so that we are consistent. 2. I am also not a particular fan of the

Re: Re: Re: Re: Discussion about https://github.com/apache/pulsar/pull/11112

2021-07-07 Thread Neng Lu
- Regarding the interface design: One thing we need to confirm is whether we **don't want old runtime to execute new function without proper initialization** or not. If this rule must be followed, then one possible way is we define a separate `HookFunction` interface which includes `setup`, `pr

Re: Re: Re: Discussion about https://github.com/apache/pulsar/pull/11112

2021-07-06 Thread Enrico Olivelli
Il Mar 6 Lug 2021, 21:30 Neng Lu ha scritto: > IMHO, The old runtime should not be able to run the new functions. This is not possible to enforce this because we cannot change old code. > > > New functions require resource initialization via hooks. If the actual > `setup()` method is not calle

Re: Re: Re: Discussion about https://github.com/apache/pulsar/pull/11112

2021-07-06 Thread Neng Lu
IMHO, The old runtime should not be able to run the new functions. New functions require resource initialization via hooks. If the actual `setup()` method is not called (or only a default no-op one is called), then the function is not properly initialized and there'll be problems if they are e