cbornet commented on code in PR #15693:
URL: https://github.com/apache/pulsar/pull/15693#discussion_r890997764
##########
pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/functions/FunctionUtils.java:
##########
@@ -98,24 +95,29 @@ public static Functions searchForFunctions(String
functionsDirectory, boolean al
try (DirectoryStream<Path> stream = Files.newDirectoryStream(path,
"*.nar")) {
for (Path archive : stream) {
try {
- FunctionDefinition cntDef =
FunctionUtils.getFunctionDefinition(archive.toString());
+
+ NarClassLoader ncl = NarClassLoaderBuilder.builder()
Review Comment:
This code is inspired by what is done for
[Sources/Sinks](https://github.com/apache/pulsar/blob/9c5bc38144ea3fb74564d9291f3073ab94ebdf41/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/io/ConnectorUtils.java#L155).
For connectors, the NAR class loaders are also stored in the ConnectorsManager
and never closed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]