大数据运维及安全

Flume 运维 - Tips

2017-05-10  本文已影响145人  大数据之心

简单粗暴,直入主题,最近数仓 Streaming ETL 强依赖 Flume 作为异构同步手段,开一个帖子专门记录踩过的坑,以及如何爬上来。

Tips:

# 1.6
a1.sinks.k1.topic = mytopic
a1.sinks.k1.brokerList = localhost:9092
a1.sinks.k1.requiredAcks = 1
a1.sinks.k1.batchSize = 20
# 1.7
a1.sinks.k1.kafka.topic = mytopic
a1.sinks.k1.kafka.bootstrap.servers = localhost:9092
a1.sinks.k1.kafka.flumeBatchSize = 20
a1.sinks.k1.kafka.producer.acks = 1

An optinal property called ignoreTopicInHeader is added for Kafka Sink. Its default value is false, so it is compatible with Flume 1.6.0. If you want to ignore topic in header and write events to the topic you specified in properties file, you can set ignoreTopicInHeader to true.
Besides, three optinal properties topicHeader, keyHeader, timestampHeader are added for Kafka Source. They are similar to fileHeader and basenameHeader for Spooling Directory Source. Their default value are true, so they are compatible with Flume 1.6.0. If you do not want to add headers storing topic, key or timestamp, you can set them to false. It is also helpful for performance of Kafka Source.

上一篇 下一篇

猜你喜欢

热点阅读