[ 
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/27/24 8:40 PM:
------------------------------------------------------------------

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

1. The first is the core application flow(DistributedHerder.startService() -> 
AbstractHerder.start() -> Worker.start()) which does not require the 
Reflections method to load the plugins and is replaced by the ServiceLoader. 

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 which does not require the 
Reflections method to load the plugins and is replaced by the ServiceLoader. 

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."

 

 

For the 1st point: I assume some class inside the 
`http://connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/`
 is the starting point for the Kafka connect plugin discovery loading. I could 
not find it and I would appreciate it if you could point to that file because I 
need to check if it is still using the Reflections or ServiceLoader, to 
cross-check. 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