I want to read Apache logs in kafka and then further process in to Spark Streaming.I am new to kafka. As far as I have understand I have to write a producer class to read logs file.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can do so by creating a connector which sources each line of the log file into the Kafka topic. Check out the example here:
https://docs.confluent.io/current/connect/devguide.html#connect-developing-simple-connector