August 2017
Beginner to intermediate
278 pages
6h 40m
English
We already discussed Kafka Connect in the preceding sections. Kafka Connect refers to the Connectors that can be used to import or export data from Kafka. Kafka HDFS export Connector can be used to copy data from Kafka topic to HDFS.
HDFS Connector polls data from Kafka and writes them to HDFS. We can also specify the partition to be used, and it will divide the data into smaller chunks, where each chunk will represent a file in HDFS. Let's look into how to use this Connector.
Here is an example of Kafka Connect with producer:
kafka-avro-console-producer --broker-list localhost:9092 --topic test \
--property value.schema='{"type":"record","name":"peoplerecord","fields":[{"name":"f1","type":"string"}]}'Run kafka_to_hdfs.properties ...
Read now
Unlock full access