sijie opened a new pull request #1351: Shade pulsar-functions-runtime instead 
of pulsar-functions-worker
URL: https://github.com/apache/incubator-pulsar/pull/1351
 
 
   ### Motivation
   
   `pulsar-functions-runtime` is required by worker/broker and also it would be 
packaged into a fat jar to used by process runtime to invoke function 
executions.
   
   so
   
   1) correct shading point is at `pulsar-functions-runtime` not 
`pulsar-functions-worker`.
   2) we need to shade protobuf to ensure the protobuf used by 
bk/dlog/functions is not conflicting with the protobuf used by client/broker.
   3) pulsar is using a pretty new netty jar (4.1.21), which has some breaking 
changes at `io.netty.util.internal.ReflectionUtil'. it can't work with other 
older version. so we need to shade netty.
   
   ### Modifications
   
   - `runtime-shade`: package all the dependencies that use netty and protobuf 
and shade netty and protobuf, it also exclude the shaded client dependency. so 
that it can be integrated into worker and be used as part of worker.
   - `runtime-all`:  this is the module for packaging `runtime-shade` and a 
non-shade pulsar-client to produce a fat jar for java process runtime.
   - change `pulsar-client-tools` and `pulsar-broker` to use 
`pulsar-functions-worker` since worker module now is using a `shaded` runtime 
jar, there will be no protobuf/netty conflicts.
   
   At the same time, changed using bookkeeper/test-jar to 
bookkeeper-server-tests-shaded, so it won't pollute the classpath.
   
   ### Result
   
   - verified on mac, pulsar-functions can run with process/thread mode at 
broker. all functionalities work.
   - verified on linux, pulsar-functions can run with process/thread mode at 
broker. all functionalities work.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to