You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/16 12:43:11 UTC

[GitHub] [pulsar] cbornet opened a new pull request, #16092: [improve][functions] Use the classloader of the builtin Function in ThreadRuntime

cbornet opened a new pull request, #16092:
URL: https://github.com/apache/pulsar/pull/16092

   <!--
   ### Contribution Checklist
     
     - PR title format should be *[type][component] summary*. For details, see *[Guideline - Pulsar PR Naming Convention](https://docs.google.com/document/d/1d8Pw6ZbWk-_pCKdOmdvx9rnhPiyuxwq60_TrD68d7BA/edit#heading=h.trs9rsex3xom)*. 
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   ### Motivation
   
   Currently a new classloader is spawned for each Function created.
   This PR optimizes to use the classloader of the already loaded Function when the Function is built-in in ThreadRuntime.
   This make it the same as what is done for connectors.
   
   ### Modifications
   
   * Move FunctionsManager to `pulsar-functions-runtime` (necessary to prevent cyclic dependencies)
   * Add `FunctionsManager` parametet to `RuntimeFactory :: initialize`
   * Get classloader from `FunctionsManager` in `ThreadRuntime::getFunctionClassLoader`
    
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as `PulsarFunctionE2ETest::testPulsarFunctionBuiltin`
   
   ### Does this pull request potentially affect one of the following parts:
   
   no ?
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [x] `doc-not-needed` 
   optimization
     
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] cbornet commented on pull request #16092: [improve][functions] Use the classloader of the builtin Function in ThreadRuntime

Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #16092:
URL: https://github.com/apache/pulsar/pull/16092#issuecomment-1158750289

   /pulsarbot rerun-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] dlg99 merged pull request #16092: [improve][functions] Use the classloader of the builtin Function in ThreadRuntime

Posted by GitBox <gi...@apache.org>.
dlg99 merged PR #16092:
URL: https://github.com/apache/pulsar/pull/16092


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org