[ 
https://issues.apache.org/jira/browse/KAFKA-15203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849814#comment-17849814
 ] 

Ganesh Sadanala edited comment on KAFKA-15203 at 5/28/24 12:20 AM:
-------------------------------------------------------------------

[~chia7712] There are 2 ways to invoke the Kafka Connect Plugin discovery.

1. The first is the core application flow(Plugins.initLoaders(...) which is 
used by Worker.startConnector(...)). I see that initLoaders is still using 
`ReflectionScanner` along with `ServiceLoader` to load plugins. The use case is 
to completely transition this to `ServiceLoader`. [~gharris1727] Is 
`ReflectionScanner` still needed here?

2. The terminal invoking tool/script `connect-plugin-path.sh` which uses the 
`org.apache.kafka.tools.ConnectPluginPath` to make use of both the Reflections 
and ServiceLoader mechanism to load the plugins. Since this a manual invoke 
(which I assume), there is no harm in using the Reflections for loading other 
plugins which are not required for the connect and/or not having the manifest 
files. 

I think this is the reason why [~gharris1727] said about it in the first 
comment: "The long term plan will be to make the reflections library less 
necessary via KAFKA-14627, and then the usage of reflections can be limited to 
the connect-plugin-path.sh script. We have not yet decided on a deprecation 
schedule and corresponding sunset date on the usage of this library."

 

 

I am still going through the codebase to see if any modifications are needed. 

 

 


was (Author: JIRAUSER305566):
[~chia7712] There are 2 ways to invoke the Kafka Connect Plugin discovery.

1. The first is the core application flow(Plugins.initLoaders(...) which is 
used by Worker.startConnector(...)). I see that initLoaders is still using 
`ReflectionScanner` along with `ServiceLoader` to load plugins.

2. The terminal invoking tool/script `connect-plugin-path.sh` which uses the 
`org.apache.kafka.tools.ConnectPluginPath` to make use of both the Reflections 
and ServiceLoader mechanism to load the plugins. Since this a manual invoke 
(which I assume), there is no harm in using the Reflections for loading other 
plugins which are not required for the connect and/or not having the manifest 
files. 

I think this is the reason why [~gharris1727] said about it in the first 
comment: "The long term plan will be to make the reflections library less 
necessary via KAFKA-14627, and then the usage of reflections can be limited to 
the connect-plugin-path.sh script. We have not yet decided on a deprecation 
schedule and corresponding sunset date on the usage of this library."

 

 

I am still going through the codebase to see if any modifications are needed. 

 

 

> Remove dependency on Reflections 
> ---------------------------------
>
>                 Key: KAFKA-15203
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15203
>             Project: Kafka
>          Issue Type: Bug
>          Components: connect
>            Reporter: Divij Vaidya
>            Assignee: Ganesh Sadanala
>            Priority: Major
>              Labels: newbie
>             Fix For: 5.0.0
>
>
> We currently depend on reflections library which is EOL. Quoting from the 
> GitHub site:
> _> Please note: Reflections library is currently NOT under active development 
> or maintenance_
>  
> This poses a supply chain risk for our project where the security fixes and 
> other major bugs in underlying dependency may not be addressed timely.
> Hence, we should plan to remove this dependency.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to