Flume 的使用案例
来源:互联网 发布:工作牌制作软件 编辑:程序博客网 时间:2024/05/16 23:38
Part I. 单节点上设置,
1. dump command
The command’s syntax is flume dump <source> [<outputformat>]
. It prints data from<source>
to the console. Optionally, an output format can be specified, otherwise the default text format is used.
if you want a text file where each line represents a new event, run the following command.
$ flume dump 'text("/etc/services")'
This command reads the file, and then outputs each line as a new event to console. console是默认的sink, 运行这个命令就自动进入console了。
2. 单节点上一般
(1) 运行master,flume需要一个master: flume master
(2)运行一个node,通过flume启动的都是physical node: flume node_nowatch -n hostname_phys_1;
(3) 通过flume shell, 配置一个config, 这里就建立起logical node了: exec config local_tTOt 'text("/home/admin/test1.txt")' 'text("/home/admin/test2.txt")'
怎么样,通过以上例子,物理节点和逻辑节点一下子就分清楚 了吧! "/home/biadmin/test1.txt"(这个文件一般要求先创建的), sink的,则flume会负责。
(4) exec map hostname_phys_1 local_tTOt; 这一步就把物理节点和逻辑节点map or关联起来。
这样一个完整的单机实现flume的例子就完成了,查看文件/home/admin/test2.txt, 可以看到结果了。
Part II.
- Flume 的使用案例
- flume 案例
- Flume案例
- flume的几个经典配置案例
- 第三章、flume的简单案例
- flume的简单使用
- flume的使用
- Flume Interceptors的使用
- Flume的基本使用
- Flume Interceptors的使用
- flume学习:Flume Interceptors的使用
- flume-02-flume案例集锦
- flume + hdfs 案例
- flume案例集锦
- Flume hdfs 案例
- flume配置及案例
- Flume入门教程-简单案例
- flume应用案例
- jsp中判断权限,若没有登录,则不能访问
- Topic Models, LDA and all that
- 黑马程序员—面向对象的部分知识点
- 包含与继承
- html5离线应用
- Flume 的使用案例
- (转)那些年,我们一起合作时头痛的事--项目沟通
- 程序员面试----动态规划法的应用
- 编译原理你懂多少
- 编译java文件(第三方jar包)
- POSIX线程多线程例子
- 在Linux下使用subversion搭建项目
- DXperience学习笔记 TextEdit非空验证设置
- 动态添加navBarControl1 DXperience学习笔记