热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Flume使用大全之kafkasource-kafkachannel-hdfs

agent.sourceskafkaSource1agent.channelskafkaChannelagent.sinkshdfsSinkagent.sources.kafkaSo


agent.sources = kafkaSource1
agent.channels = kafkaChannel
agent.sinks = hdfsSink
agent.sources.kafkaSource1.channels = kafkaChannel
agent.sinks.hdfsSink.channel = kafkaChannel




agent.sources.kafkaSource1.type = org.apache.flume.source.kafka.KafkaSource
agent.sources.kafkaSource1.zookeeperCOnnect= node1:2181
agent.sources.kafkaSource1.topic = bpu_sensor_router,bpu_sensor_record_present,bpu_group_status_present,bpu_gateway_heartbeat,bpu_gateway_router,bpu_sensor_heartbeat
agent.sources.kafkaSource1.consumer.group.id = flume
agent.sources.kafkaSource1.kafka.consumer.timeout.ms = 100
agent.sources.kafkaSource1.kafka.bootstrap.servers = node7:9092
agent.sources.kafkaSource1.batchSize = 100
agent.sources.kafkaSource1.batchDuratiOnMillis= 1000






agent.channels.kafkaChannel.type = org.apache.flume.channel.kafka.KafkaChannel
agent.channels.kafkaChannel.kafka.bootstrap.servers = node7:9092
agent.channels.kafkaChannel.kafka.topic = flume-kafkaChannel
agent.channels.kafkaChannel.consumer.group.id = flume-consumer






#---------hdfsSink 相关配置------------------
agent.sinks.hdfsSink.type = hdfs
# 注意, 我们输出到下面一个子文件夹data中
agent.sinks.hdfsSink.hdfs.path = hdfs://nameservice1/user/hive/warehouse/%{topic}/%Y/%m/%d
agent.sinks.hdfsSink.hdfs.writeFormat = TEXT
agent.sinks.hdfsSink.hdfs.fileType = DataStream
agent.sinks.hdfsSink.hdfs.rollSize = 128000000
agent.sinks.hdfsSink.hdfs.rollInterval=60
agent.sinks.hdfsSink.hdfs.rollCount = 0
agent.sinks.hdfsSink.hdfs.batchSize = 100
agent.sinks.hdfsSink.hdfs.batchDuratiOnMillis= 1000
agent.sinks.hdfsSink.hdfs.round = true
agent.sinks.hdfsSink.hdfs.roundUnit = day
agent.sinks.hdfsSink.hdfs.roundValue = 1
agent.sinks.hdfsSink.hdfs.threadsPoolSize = 25
agent.sinks.hdfsSink.hdfs.useLocalTimeStamp = true
agent.sinks.hdfsSink.hdfs.minBlockReplicas = 1
agent.sinks.hdfsSink.hdfs.idleTimeout = 30
agent.sinks.hdfsSink.hdfs.filePrefix= %{topic}




推荐阅读
author-avatar
鱼和鱼还有鱼3_Mh_qet
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有