-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#6003][pulsar-functions] Possibility to add builtin Functions #6895
Conversation
b96197a
to
71b3819
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks great!
@oncodeit can you rebase this pull request to latest master? |
@sijie rebase done |
@nicolo-paganin Could you please take a look at the failed CI tests? |
@codelipenghui I think I need some help, there are 5 CI tests that I really don't know.. something that I never modified.. |
69e3046
to
c261f2b
Compare
@codelipenghui I rebased and some CI tests that were failing now are passing, but there are two that are not passing, it is nothing related with this PR. |
one of the error is this one https://github.com/streamnative/pulsar/issues/662 already report by @sijie |
@codelipenghui any ideas on how to fix the CI? |
@nicolo-paganin You can merge the master branch into your branch, there are some conflicts fixed on the master branch. |
@codelipenghui ok thanks, the pipeline finally passed |
…te-update * 'website-update' of github.com:zeo1995/pulsar: (432 commits) Fixed ordering issue in KeyShared dispatcher when adding consumer (apache#7106) Fix Duplicated messages are sent to dead letter topic apache#6960 (apache#7021) [Issue 2793][Doc]--Update the TLS hostname verification for CPP and Python clients (apache#7162) [Doc]--set netty mex frame size (apache#7174) [Doc] Update for the maximum message size (apache#7171) Fixed KeyShared consumers getting stuck on delivery (apache#7105) [apache#6003][pulsar-functions] Possibility to add builtin Functions (apache#6895) [Issue 6921][pulsar-broker-common] Replaced "Paths.get(...).getParent()", because it's system dependent and uses '\' as path separator on Windows (apache#6992) Improve broker unit test CI (apache#7173) Fix typo in exception message (apache#7027) Support KeyValue Schema Use Null Key And Null Value (apache#7139) [Doc]--Update documents for support consumer priority level in failover mode (apache#7136) Add schema config to cpp and cgo docs. (apache#7137) [Doc]--Update for the maximum message size (apache#7160) [C++] Expose ZSTD and Snappy compression to C API (apache#7014) [pulsar-proxy] add proxyLogLevel into config file (apache#6948) Add multi-hosts example for bookkeeperMetadataServiceUri (apache#6998) support for termination of partitioned topic (apache#6126) Use pure-java Air-Compressor instead of JNI based libraries (apache#5390) [Issues 5709]remove the namespace checking (apache#5716) ... # Conflicts: # site2/website/scripts/split-swagger-by-version.js
…pache#6895) Master Issue: apache#6003 This pull request implements the possibility to add builtin functions (in the same way of the build in connectors). The builtin function must include a `pulsar-io.yml` file with the following content ```yml name: <function-name> description: <function-desciption> functionClass: <function-class> ``` e.g. ```yml name: test-function description: test function description functionClass: it.oncode.pulsar.functions.TestFunction ``` it is possible to create a builtin function in the same way of the builtin sinks/sources. Example in scala ```scala val functionConfigBuilder: FunctionConfigBuilder = FunctionConfig.builder() val function = functionConfigBuilder .tenant("public") .namespace("default") .jar("builtin://test-function") .name("test-function-name") .className("it.oncode.pulsar.functions.TestFunction") .inputs(Seq("channel_in").asJava) .output("channel_out") .runtime(FunctionConfig.Runtime.JAVA) .build() Pulsar.admin.functions .createFunction(function, null) ``` Function folder to be specified in the `conf/functions_worker.yml` conf file e.g. `functionsDirectory: ./functions` Function package must be in `*.nar` format like for source/sink connectors I modified the `pulsar-function-utils`, `pulsar-functions-worker` and `pulsar-common` modules on the basis of the built in connectors implementation. Also `Function.proto` has been modified in order to include the `builtin` property - modification of pulsar-admin to fetch the available buildin functions - the related documentation This is a feature that is critical for us, I think we could open an issue for the remaining points and consider to merge this PR.
…pache#6895) Master Issue: apache#6003 ### Motivation This pull request implements the possibility to add builtin functions (in the same way of the build in connectors). The builtin function must include a `pulsar-io.yml` file with the following content ```yml name: <function-name> description: <function-desciption> functionClass: <function-class> ``` e.g. ```yml name: test-function description: test function description functionClass: it.oncode.pulsar.functions.TestFunction ``` it is possible to create a builtin function in the same way of the builtin sinks/sources. Example in scala ```scala val functionConfigBuilder: FunctionConfigBuilder = FunctionConfig.builder() val function = functionConfigBuilder .tenant("public") .namespace("default") .jar("builtin://test-function") .name("test-function-name") .className("it.oncode.pulsar.functions.TestFunction") .inputs(Seq("channel_in").asJava) .output("channel_out") .runtime(FunctionConfig.Runtime.JAVA) .build() Pulsar.admin.functions .createFunction(function, null) ``` Function folder to be specified in the `conf/functions_worker.yml` conf file e.g. `functionsDirectory: ./functions` Function package must be in `*.nar` format like for source/sink connectors ### Modifications I modified the `pulsar-function-utils`, `pulsar-functions-worker` and `pulsar-common` modules on the basis of the built in connectors implementation. Also `Function.proto` has been modified in order to include the `builtin` property #### What this MR does not include - modification of pulsar-admin to fetch the available buildin functions - the related documentation This is a feature that is critical for us, I think we could open an issue for the remaining points and consider to merge this PR.
…pache#6895) Master Issue: apache#6003 ### Motivation This pull request implements the possibility to add builtin functions (in the same way of the build in connectors). The builtin function must include a `pulsar-io.yml` file with the following content ```yml name: <function-name> description: <function-desciption> functionClass: <function-class> ``` e.g. ```yml name: test-function description: test function description functionClass: it.oncode.pulsar.functions.TestFunction ``` it is possible to create a builtin function in the same way of the builtin sinks/sources. Example in scala ```scala val functionConfigBuilder: FunctionConfigBuilder = FunctionConfig.builder() val function = functionConfigBuilder .tenant("public") .namespace("default") .jar("builtin://test-function") .name("test-function-name") .className("it.oncode.pulsar.functions.TestFunction") .inputs(Seq("channel_in").asJava) .output("channel_out") .runtime(FunctionConfig.Runtime.JAVA) .build() Pulsar.admin.functions .createFunction(function, null) ``` Function folder to be specified in the `conf/functions_worker.yml` conf file e.g. `functionsDirectory: ./functions` Function package must be in `*.nar` format like for source/sink connectors ### Modifications I modified the `pulsar-function-utils`, `pulsar-functions-worker` and `pulsar-common` modules on the basis of the built in connectors implementation. Also `Function.proto` has been modified in order to include the `builtin` property #### What this MR does not include - modification of pulsar-admin to fetch the available buildin functions - the related documentation This is a feature that is critical for us, I think we could open an issue for the remaining points and consider to merge this PR.
Master Issue: #6003
Motivation
This pull request implements the possibility to add builtin functions (in the same way of the build in connectors).
The builtin function must include a
pulsar-io.yml
file with the following contente.g.
it is possible to create a builtin function in the same way of the builtin sinks/sources.
Example in scala
Function folder to be specified in the
conf/functions_worker.yml
conf filee.g.
functionsDirectory: ./functions
Function package must be in
*.nar
format like for source/sink connectorsModifications
I modified the
pulsar-function-utils
,pulsar-functions-worker
andpulsar-common
modules on the basis of the built in connectors implementation.Also
Function.proto
has been modified in order to include thebuiltin
propertyWhat this MR does not include
This is a feature that is critical for us, I think we could open an issue for the remaining points and consider to merge this PR.
Documentation