简体   繁体   English

将jar添加到Confluent Docker中的常规Kafka Connect类路径

[英]Add jar to general Kafka Connect classpath in the Confluent Docker

I am using the confluent docker for Kafka connect v4.1.1 and would like to add a jar with specific log4j appenders. 我正在使用融合的docker for Kafka connect v4.1.1,并希望添加一个具有特定log4j appender的jar。
With the classpath isolation by connector, I am not sure where to place that jar in the confluent docker, as it is used by the parent kafka connect itself and not the connectors. 通过连接器的classpath隔离,我不知道将jar放在汇合的docker中的位置,因为它由父kafka connect本身而不是连接器使用。

Thanks in advance for the help! 在此先感谢您的帮助!

If you want to add a jar that will be used by the Connect framework and is not specific to any of the connectors, you have the following options: 如果要添加将由Connect框架使用的jar并且不特定于任何连接器,则可以使用以下选项:

  1. Add the jar to the classpath with: jar添加到类路径中:

    -e CLASSPATH=/path/to/custom/library.jar

  2. Copy the jar directly to the directory that includes the Kafka Connect framework. jar直接复制到包含Kafka Connect框架的目录。 In Confluent docker images this is currently: 在Confluent docker图像中,目前是:

    /usr/share/java/kafka

You need to make sure this jar is not in conflict with any of the dependencies of Kafka Connect. 您需要确保此jar与Kafka Connect的任何依赖项不冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM