我是靠谱客的博主 贤惠冰淇淋,最近开发中收集的这篇文章主要介绍flume配置文件--httpSource,kafkaChannel,hdfsSink,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

tier1.sources = httpSource
tier1.channels = kafkaChannel
tier1.sinks = hdfsSink

tier1.sources.httpSource.channels = kafkaChannel
tier1.sinks.hdfsSink.channels = kafkaChannel


#--------httpSource--------
tier1.sources.httpSource.type = org.apache.flume.source.http.HTTPSource
tier1.sources.httpSource.port = 9999
tier1.sources.httpSource.channels = kafkaChannel
tier1.sources.httpSource.handler = com.bolo.flume.http.BoloJSONHandler

#--------kafkaChannel---------
tier1.channels.kafkaChannel.type = org.apache.flume.channel.kafka.KafkaChannel
tier1.channels.kafkaChannel.capacity = 10000
tier1.channels.kafkaChannel.transactionCapacity = 1000
tier1.channels.kafkaChannel.brokerList=localhost:9092
tier1.channels.kafkaChannel.topic=TOPIC_USER_BEHAVIOR_NEW
tier1.channels.kafkaChannel.zookeeperConnect= localhost饿:2181
tier1.channels.kafkaChannel.groupId    = test


#---------hdfsSink 相关配置------------------
tier1.sinks.hdfsSink.type = org.apache.flume.sink.hdfs.HDFSEventSink
tier1.sinks.hdfsSink.hdfs.path = /data/suiyue/data-ods/client-event/%Y%m%d
tier1.sinks.hdfsSink.hdfs.writeFormat = Text
tier1.sinks.hdfsSink.hdfs.fileType = DataStream
tier1.sinks.hdfsSink.hdfs.rollSize = 33554432
tier1.sinks.hdfsSink.hdfs.rollCount = 0
tier1.sinks.hdfsSink.hdfs.rollInterval = 30
tier1.sinks.hdfsSink.hdfs.batchSize=1000

最后

以上就是贤惠冰淇淋为你收集整理的flume配置文件--httpSource,kafkaChannel,hdfsSink的全部内容,希望文章能够帮你解决flume配置文件--httpSource,kafkaChannel,hdfsSink所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(37)

评论列表共有 0 条评论

立即
投稿
返回
顶部