function-mesh icon indicating copy to clipboard operation
function-mesh copied to clipboard

inferring `typeClassName` in Java Runner if `typeClassName` is not provided

Open freeznet opened this issue 4 years ago • 1 comments

When upload Pulsar's Java Functions package, the Pulsar's functions worker will load the package into the class loader, and try to extract the type args of the defined function. Then the type args will be used as typeClassName in FunctionDetails. ref: https://github.com/apache/pulsar/blob/branch-2.10/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionCommon.java#L94-L125

In Function Mesh, the operator cannot do not support load JAR package and extract the type args, so the typeClassName requires user to manually provided.

A possible solution is, to embed a simple Java app to extract the type args before function start.

freeznet avatar Apr 21 '21 09:04 freeznet

solving this issue from pulsar's function instance starter: https://github.com/apache/pulsar/issues/18110

freeznet avatar Oct 19 '22 09:10 freeznet