Closed Shykeng closed 9 months ago
Fix it by updating the following fields :
This "fs.cleanup.policy.class":"io.streamthoughts.kafka.connect.filepulse.clean.LogCleanupPolicy"
to this "fs.cleanup.policy.class":"io.streamthoughts.kafka.connect.filepulse.fs.clean.LogCleanupPolicy"
And this "task.reader.class":"io.streamthoughts.kafka.connect.filepulse.reader.RowFileInputReader"
to this "tasks.reader.class":"io.streamthoughts.kafka.connect.filepulse.fs.reader.LocalRowFileInputReader"
Be careful as there are not so much tutorials online which are up to date (i.e. plugin version) and so class may differs !
Which gives us:
curl \
-i -X PUT -H "Accept:application/json" \
-H "Content-Type:application/json" http://localhost:8083/connectors/connectors/source-log-filepulse-00/config \
-d '{
"connector.class":"io.streamthoughts.kafka.connect.filepulse.source.FilePulseSourceConnector",
"fs.scan.directory.path":"/home/aurelien/logs/",
"fs.scan.interval.ms":"10000",
"fs.scan.filters":"io.streamthoughts.kafka.connect.filepulse.scanner.local.filter.RegexFileListFilter",
"fs.listing.class":"io.streamthoughts.kafka.connect.filepulse.fs.LocalFSDirectoryListing",
"fs.cleanup.policy.class":"io.streamthoughts.kafka.connect.filepulse.fs.clean.LogCleanupPolicy",
"file.filter.regex.pattern":".*\\.log$",
"tasks.reader.class":"io.streamthoughts.kafka.connect.filepulse.fs.reader.LocalRowFileInputReader",
"offset.strategy":"name",
"skip.headers": "1",
"topic":"enel",
"internal.kafka.reporter.bootstrap.servers":"broker:29092",
"internal.kafka.reporter.topic":"connect-file-pulse-status",
"tasks.max": 1
}'
Links to class path I resolved : tasks.reader.class and fs.cleanup.policy.class I hope it may help someone facing those issues!
Hello everyone,
I'm new to kafka and data streaming architecure and I'm currently running into an issue.
Indeed I'm looking for a way to ingest datas from a log file (firstly localy and later on remotely with the SftpFilesystemListing class as suggested here) into kafka topic through Confluent Platform using File Pulse source connector 2.10 dowloaded via Confluent Hub CLI.
However I'm unable to access required classes when trying to set up the connector through Connect API:
It returns:
And running it directly with the connector wizard on Confluent Control Center doesn't help either.
My
plugin.path
is set to/opt/confluent/share/confluent-hub-components
where I have 3 connectors:Running Confluent Platform 7.5 with open jdk 11 on Ubuntu 22.04.3 LTS
Can anyone help me ?
Thank you.