Flume是什么

分布式流式实时收集日志文件系统,便于实时在线的流式计算,常配合 Storm 和 spark streming 使用。

Flume is a distributed分布式的, reliable可靠的, and available可用的 service for efficiently高效 collecting收集, aggregating聚合, and moving移动 large amounts of log data.
It has a simple简单 and flexible灵活 architecture结构 based on streaming流式 data flows. It is robust健壮 and fault tolerant容错 with tunable可调 reliability mechanisms机制 and many failover and recovery mechanisms. It uses a simple extensible可拓展 data model that allows for online analytic application.

架构图如下

角色 作用
Agent Flume的客户端
Event Flume 数据传输的基本单元,由 [Header] 和 数据的 byte Array 构成,载有数据对Flume不透明;Header 是容纳了KEY_VALUE对的无序集合(Key是唯一的);Header 可以在上下文路由中使用拓展
Source 用于收集数据,产生数据源的地方,并主动推送数据到 Channel 中
Channel 数据管道,用于连接 sources 和 sinks ,可以连接多个Source(所谓的分布式),在管道前后增加过滤器可以清洗数据
Sink 主动到 Channel 拉取数据,向目标源写数据,目标源可以使HDFS、HBase 也可以是下一个Source

Flume 配置

编辑配置文件的 $JAVA_PATH 就可以使用了

posted @ 2017-07-23 11:39  岑忠满  阅读(663)  评论(0编辑  收藏  举报