flume整合kafka
2016-02-27 11:09
387 查看
# Please paste flume.conf here. Example: # Sources, channels, and sinks are defined per # agent name, in this case 'tier1'. tier1.sources = source1 tier1.channels = channel1 tier1.sinks = sink1 # For each source, channel, and sink, set # standard properties. tier1.sources.source1.type = syslogtcp tier1.sources.source1.bind = 127.0.0.1 tier1.sources.source1.port = 9999 tier1.sources.source1.channels = channel1 tier1.channels.channel1.type = memory tier1.sinks.sink1.channel = channel1 tier1.sinks.sink1.type = org.apache.flume.sink.kafka.KafkaSink tier1.sinks.sink1.topic = ggz tier1.sinks.sink1.brokerList = ha1:9092 tier1.sinks.sink1.requiredAcks = 1 tier1.sinks.sink1.batchSize = 20 # Other properties are specific to each type of # source, channel, or sink. In this case, we # specify the capacity of the memory channel. tier1.channels.channel1.capacity = 100
测试:
生产者:nc ha1 9999
消费者:kafka-console-consumer –zookeeper ha0 –topic ggz –from-beginning
相关文章推荐
- 用Peterson算法实现临界区的控制
- HDFS一些参数的设置说明
- 浅析string 与char* char[]之间的转换
- hdu 2512 一卡通大冒险【dp】【第二类斯特灵数】
- 使用TabLayout代替ViewPagerIndicator
- 韩顺平dedecms讲解上课记录
- 当ViewPager嵌套在ScrollView/ListView里时,手势冲突如何处理?
- hdu 1151 Air Raid
- Libev库学习3---watcher与loop的操作
- 在github上维护开源项目的流程
- 10026---forward和redirect的区别
- java中变量值为NULL的意义
- 展望2016,,总结2015
- 线程并发
- 分布式环境下的id生成方法
- Angularjs中设置cookies的过期时间
- [转]Java使用commons-dbcp2.0
- Python的函数参数传递:传值?引用?
- Java- dos命令下带包运行
- python sklearn包——3.1cross validation笔记