Hieu,

The FileStreamSource and FileStreamSink (no hyphen) connectors are no
longer included on the classpath by default since minor version 3.2.0 (and
some earlier patch releases) due to security concerns.
See the release notes that mention this, and contain a workaround here:
https://kafka.apache.org/32/documentation.html#upgrade_320_notable .
See the internal issue for this change here:
https://issues.apache.org/jira/browse/KAFKA-13748

I hope this helps,
Greg Harris

On Sat, Jan 28, 2023 at 7:36 AM Hieu Nguyen <emerald.h...@gmail.com> wrote:

> Hello,
>
> I'm reading the book "Kafka: The Definitive Guide: Real-Time Data and
> Stream Processing at Scale" by by Neha Narkhede, Gwen Shapira, and Todd
> Palino.
>
> In the chapter "Kafka Connect", section "Connector Example: File Source
> and File Sink", I run the below command and got the missing connector error.
>
> hieunguyenduc@hieugioi kafka_2.13-3.3.1 % echo
> '{"name":"load-kafka-config",
> "config":{"connector.class":"FileStream-Source","file":"config/server.properties","topic":"kafka-config-topic"}}'
> | curl -X POST -d @- http://localhost:8083/connectors --header
> "Content-Type:application/json"
> {"error_code":500,"message":"Failed to find any class that implements
> Connector and which name matches FileStream-Source, available connectors
> are: PluginDesc{klass=class
> org.apache.kafka.connect.mirror.MirrorCheckpointConnector,
> name='org.apache.kafka.connect.mirror.MirrorCheckpointConnector',
> version='3.3.1', encodedVersion=3.3.1, type=source, typeName='source',
> location='classpath'}, PluginDesc{klass=class
> org.apache.kafka.connect.mirror.MirrorHeartbeatConnector,
> name='org.apache.kafka.connect.mirror.MirrorHeartbeatConnector',
> version='3.3.1', encodedVersion=3.3.1, type=source, typeName='source',
> location='classpath'}, PluginDesc{klass=class
> org.apache.kafka.connect.mirror.MirrorSourceConnector,
> name='org.apache.kafka.connect.mirror.MirrorSourceConnector',
> version='3.3.1', encodedVersion=3.3.1, type=source, typeName='source',
> location='classpath'}, PluginDesc{klass=class
> org.apache.kafka.connect.tools.MockSinkConnector,
> name='org.apache.kafka.connect.tools.MockSinkConnector', version='3.3.1',
> encodedVersion=3.3.1, type=sink, typeName='sink', location='classpath'},
> PluginDesc{klass=class org.apache.kafka.connect.tools.MockSourceConnector,
> name='org.apache.kafka.connect.tools.MockSourceConnector', version='3.3.1',
> encodedVersion=3.3.1, type=source, typeName='source',
> location='classpath'}, PluginDesc{klass=class
> org.apache.kafka.connect.tools.SchemaSourceConnector,
> name='org.apache.kafka.connect.tools.SchemaSourceConnector',
> version='3.3.1', encodedVersion=3.3.1, type=source, typeName='source',
> location='classpath'}, PluginDesc{klass=class
> org.apache.kafka.connect.tools.VerifiableSinkConnector,
> name='org.apache.kafka.connect.tools.VerifiableSinkConnector',
> version='3.3.1', encodedVersion=3.3.1, type=sink, typeName='sink',
> location='classpath'}, PluginDesc{klass=class
> org.apache.kafka.connect.tools.VerifiableSourceConnector,
> name='org.apache.kafka.connect.tools.VerifiableSourceConnector',
> version='3.3.1', encodedVersion=3.3.1, type=source, typeName='source',
> location='classpath'}"}%
>
> How can I fix it?
>
> The part after that says "
>
> If all went well, you should see something along the lines of:
>     {"schema":{"type":"string","optional":false},"payload":"# Licensed to
> the
>     Apache Software Foundation (ASF) under one or more"}
>
> "
>
> I run the command and it shows nothing.
>
> Regards,
> Hieu
>
>
>

Reply via email to