sink示例
2016-04-13 15:36
232 查看
7、hdfs实例
case8_hdfs.conf
#配置内容
#name the component on this agent
a1.sources = r1
a1.channels= c1
a1.sinks = k1
#describe/configure the source
a1.sources.r1.type = syslogtcp
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 5140
a1.sources.r1.channels = c1
#decribe the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.channel = c1
a1.sinks.k1.hdfs.path = hdfs://hdpha/wyb
a1.sinks.k1.hdfs.filePrefix = Syslog
a1.sinks.k1.hdfs.round = true
a1.sinks.k1.hdfs.roundValue = 10
a1.sinks.k1.hdfs.roundUnit = minute
#use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
8、一个agent采集数据发送到另一个agent实例
case9_avro.conf case10_avro_sink.conf
#配置内容
#name the component on this agent
a1.sources = r1
a1.channels= c1
a1.sinks = k1
#describe/configure the source
a1.sources.r1.type = avro
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 4545
a1.sources.r1.channels = c1
#decribe the sink
a1.sinks.k1.type = logger
a1.sinks.k1.channel = c1
#use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
case10_avro_sink.conf
#配置内容
#name the component on this agent
a2.sources = r1
a2.channels= c1
a2.sinks = k1
#describe/configure the source
a2.sources.r1.type = syslogtcp
a2.sources.r1.bind = localhost
a2.sources.r1.port = 5140
a2.sources.r1.channels = c1
#decribe the sink
a2.sinks.k1.type = avro
a2.sinks.k1.channel = c1
a2.sinks.k1.hostname= master-active
a2.sinks.k1.port= 4545
#use a channel which buffers events in memory
a2.channels.c1.type = memory
a2.channels.c1.capacity = 1000
a2.channels.c1.transactionCapacity = 100
9、file roll sink
#配置内容
#name the component on this agent
a2.sources = r1
a2.channels= c1
a2.sinks = k1
#describe/configure the source
a2.sources.r1.type = syslogtcp
a2.sources.r1.bind = localhost
a2.sources.r1.port = 5140
a2.sources.r1.channels = c1
#decribe the sink
a2.sinks.k1.type = file_roll
a2.sinks.k1.channel = c1
a2.sinks.k1.sink.directory= /var/logs/flume
#use a channel which buffers events in memory
a2.channels.c1.type = memory
a2.channels.c1.capacity = 1000
a2.channels.c1.transactionCapacity = 100
case8_hdfs.conf
#配置内容
#name the component on this agent
a1.sources = r1
a1.channels= c1
a1.sinks = k1
#describe/configure the source
a1.sources.r1.type = syslogtcp
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 5140
a1.sources.r1.channels = c1
#decribe the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.channel = c1
a1.sinks.k1.hdfs.path = hdfs://hdpha/wyb
a1.sinks.k1.hdfs.filePrefix = Syslog
a1.sinks.k1.hdfs.round = true
a1.sinks.k1.hdfs.roundValue = 10
a1.sinks.k1.hdfs.roundUnit = minute
#use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
8、一个agent采集数据发送到另一个agent实例
case9_avro.conf case10_avro_sink.conf
#配置内容
#name the component on this agent
a1.sources = r1
a1.channels= c1
a1.sinks = k1
#describe/configure the source
a1.sources.r1.type = avro
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 4545
a1.sources.r1.channels = c1
#decribe the sink
a1.sinks.k1.type = logger
a1.sinks.k1.channel = c1
#use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
case10_avro_sink.conf
#配置内容
#name the component on this agent
a2.sources = r1
a2.channels= c1
a2.sinks = k1
#describe/configure the source
a2.sources.r1.type = syslogtcp
a2.sources.r1.bind = localhost
a2.sources.r1.port = 5140
a2.sources.r1.channels = c1
#decribe the sink
a2.sinks.k1.type = avro
a2.sinks.k1.channel = c1
a2.sinks.k1.hostname= master-active
a2.sinks.k1.port= 4545
#use a channel which buffers events in memory
a2.channels.c1.type = memory
a2.channels.c1.capacity = 1000
a2.channels.c1.transactionCapacity = 100
9、file roll sink
#配置内容
#name the component on this agent
a2.sources = r1
a2.channels= c1
a2.sinks = k1
#describe/configure the source
a2.sources.r1.type = syslogtcp
a2.sources.r1.bind = localhost
a2.sources.r1.port = 5140
a2.sources.r1.channels = c1
#decribe the sink
a2.sinks.k1.type = file_roll
a2.sinks.k1.channel = c1
a2.sinks.k1.sink.directory= /var/logs/flume
#use a channel which buffers events in memory
a2.channels.c1.type = memory
a2.channels.c1.capacity = 1000
a2.channels.c1.transactionCapacity = 100
相关文章推荐
- 第06篇 MyEclipse 2016 安装/破解
- 可展开的UITableViewCell
- 比特币学习 (1) 定义
- python pymongo-ensure_index
- 崔用志-微信开发-java版本
- 几何计算
- JTA jdbc处理 事务
- Java数据类型
- java书籍推荐
- mysql left( right ) join使用on 与where 筛选的差异。mysql的执行顺序
- phpstorm invalid descendent file name
- Android 使用Smack+openfire开发基于XMPP协议的聊天
- 数据库SQL SELECT查询的工作原理
- SHELL test [ 命令用法
- UB-AMP
- [powerDesigner]从数据库导出实体模型
- CocoaPods的安装使用
- iOS自己捕获异常定位错误代码
- 使用fcitx输入法,卸载ibus
- Agri-Net