Flume实例一学习
2015-08-21 15:55
267 查看
cp conf/flume-env.sh.template conf/flume-env.sh
打开flume-env.sh,配置Java环境变量
[root@test1 apache-flume-1.6.0-bin]# vim conf/flume.conf # Define a memory channel called ch1 on agent1 agent1.channels.ch1.type = memory # Define an Avro source called avro-source1 on agent1 and tell it # to bind to 0.0.0.0:41414. Connect it to channel ch1. agent1.sources.avro-source1.channels = ch1 agent1.sources.avro-source1.type = avro agent1.sources.avro-source1.bind = 0.0.0.0 agent1.sources.avro-source1.port = 41414 # Define a logger sink that simply logs all events it receives # and connect it to the other end of the same channel. agent1.sinks.log-sink1.channel = ch1 agent1.sinks.log-sink1.type = logger # Finally, now that we've defined all of our components, tell # agent1 which ones we want to activate. agent1.channels = ch1 agent1.sources = avro-source1 agent1.sinks = log-sink1
bin/flume-ng avro-client --conf conf -H localhost -p 41414 -F /etc/passwd -Dflume.root.logger=DEBUG,console
bin/flume-ng avro-client --conf conf -H localhost -p 41414 -F /etc/passwd -Dflume.root.logger=DEBUG,console
如果出现上面两个图片信息,表示运行成功。
相关文章推荐
- java基础之集合框架Collection详解
- Avro总结(RPC/序列化)
- 关于Html中的title属性内容换行,以及Bootstrap的tooltip的使用
- 搞学习还是搞技术
- js实现类似trim函数
- OC基础13:数字、字符串和集合2
- c查找算法——斐波拉契查找
- javascript 的点击复制事件
- vnc 安装使用记录
- DuiLib::CTreeViewUI 的基本用法
- Ubuntu15.04+cuda7.0+caffe+notebook
- 华为机试题【陆续更新】
- jsDuck的注释说明
- Delphi 类成员的默认访问权限(用RTTI检测)
- mysql 慢查询日志 配置【pt-query-digest工具】
- OC基础13:数字、字符串和集合2
- Android常用adb命令
- SpringMvc与Struts2的对比啦
- Javascript仿新浪游戏频道鼠标悬停显示子菜单效果
- LeetCode263:Ugly Number