snehashisp commented on code in PR #17743:
URL: https://github.com/apache/kafka/pull/17743#discussion_r1966088509
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java:
##########
@@ -1788,19 +1817,19 @@ public WorkerTask<T, R> build() {
Objects.requireNonNull(classLoader, "Classloader used by task
cannot be null");
ErrorHandlingMetrics errorHandlingMetrics =
errorHandlingMetrics(id);
- final Class<? extends Connector> connectorClass =
plugins.connectorClass(
-
connectorConfig.getString(ConnectorConfig.CONNECTOR_CLASS_CONFIG));
+
+ final Connector connector =
instantiateConnector(connectorConfig.originalsStrings());
Review Comment:
I use the connector instance in the metrics PR to get the version of the
connector in
[TaskPluginsMetadata](https://github.com/apache/kafka/blob/395a7223d99a508cf0d993b876abb105a1639bb1/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/TaskPluginsMetadata.java).
I think instantiating a connector here to get the version is okay here but we
can come back to this once we review the metrics PR.
--
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]