flume

How to use regex_extractor selector and multiplexing interceptor together in flume?

浪子不回头ぞ 提交于 2019-12-01 12:06:42
I am testing flume to load data into hHase and thinking about parallel data loading with using flume's selector and inteceptor, because of speed gap between source and sink. So, what I want to do with flume are creating Event's header with interceptors's regex_extractor type multiplexing Event with header to more than two channels with selector's multiplexing type in one source-channel-sink. and tried configuration as below. agent.sources = tailsrc agent.channels = mem1 mem2 agent.sinks = std1 std2 agent.sources.tailsrc.type = exec agent.sources.tailsrc.command = tail -F /home/flumeuser/test

Flume-ng tail a file

天涯浪子 提交于 2019-12-01 11:06:24
问题 I am trying to understand how to tail a file with flume-ng so that I can push the data into HDFS. In the first instance I have setup a simple conf file: tail1.sources = source1 tail1.sinks = sink1 tail1.channels = channel1 tail1.sources.source1.type = exec tail1.sources.source1.command = tail -F /var/log/apache2/access.log tail1.sources.source1.channels = channel1 tail1.sinks.sink1.type = logger tail1.channels.channel1.type = memory tail1.channels.channel1.capacity = 1000 tail1.channels

How to use regex_extractor selector and multiplexing interceptor together in flume?

人走茶凉 提交于 2019-12-01 08:04:48
问题 I am testing flume to load data into hHase and thinking about parallel data loading with using flume's selector and inteceptor, because of speed gap between source and sink. So, what I want to do with flume are creating Event's header with interceptors's regex_extractor type multiplexing Event with header to more than two channels with selector's multiplexing type in one source-channel-sink. and tried configuration as below. agent.sources = tailsrc agent.channels = mem1 mem2 agent.sinks =

Flume高级之自定义MySQLSource

血红的双手。 提交于 2019-12-01 07:21:42
5.1 自定义Source说明 Source是负责接收数据到Flume Agent的组件。Source组件可以处理各种类型、各种格式的日志数据,包括avro、thrift、exec、jms、spooling directory、netcat、sequence generator、syslog、http、legacy。官方提供的source类型已经很多,但是有时候并不能满足实际开发当中的需求,此时我们就需要根据实际需求自定义某些Source。 如:实时监控MySQL,从MySQL中获取数据传输到HDFS或者其他存储框架,所以此时需要我们自己实现MySQLSource。 官方也提供了自定义source的接口: 官网说明: https://flume.apache.org/FlumeDeveloperGuide.html#source 5.3 自定义MySQLSource组成 5.2 自定义MySQLSource步骤 根据官方说明自定义MySqlSource需要继承AbstractSource类并实现Configurable和PollableSource接口。 实现相应方法: getBackOffSleepIncrement()//暂不用 getMaxBackOffSleepInterval()//暂不用 configure(Context context)//初始化context

Flume监控之Ganglia

ぐ巨炮叔叔 提交于 2019-12-01 07:21:40
4.1 Ganglia的安装与部署 1) 安装httpd 服务与php [atguigu@hadoop102 flume]$ sudo yum -y install httpd php  2) 安装其他依赖 [atguigu@hadoop102 flume]$ sudo yum -y install rrdtool perl-rrdtool rrdtool-devel [atguigu@hadoop102 flume]$ sudo yum -y install apr-devel 3) 安装ganglia [atguigu@hadoop102 flume]$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [atguigu@hadoop102 flume]$ sudo yum -y install ganglia-gmetad [atguigu@hadoop102 flume]$ sudo yum -y install ganglia-web [atguigu@hadoop102 flume]$ sudo yum install -y ganglia-gmond  4) 修改配置文件/etc/httpd/conf.d/ganglia.conf

Flume 概述/企业案例

≡放荡痞女 提交于 2019-12-01 07:21:14
第1章 概述 1.1 Flume定义 Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集、聚合和传输的系统。Flume基于流式架构,灵活简单。 下面我们来详细介绍一下Flume架构中的组件。 1.2.1 Agent Agent是一个JVM进程,它以事件的形式将数据从源头送至目的,是Flume数据传输的基本单元。 Agent主要有3个部分组成,Source、Channel、Sink。 1.2.2 Source Source是负责接收数据到Flume Agent的组件。Source组件可以处理各种类型、各种格式的日志数据,包括avro、thrift、exec、jms、spooling directory、netcat、sequence generator、syslog、http、legacy。 1.2.3 Channel Channel是位于Source和Sink之间的缓冲区。因此,Channel允许Source和Sink运作在不同的速率上。Channel是线程安全的,可以同时处理几个Source的写入操作和几个Sink的读取操作。 Flume自带两种Channel:Memory Channel和File Channel。 Memory Channel是内存中的队列。Memory Channel在不需要关心数据丢失的情景下适用。如果需要关心数据丢失

大数据技术栈

烈酒焚心 提交于 2019-12-01 06:58:49
大数据技术栈 Hadoop 历史: https://www.jikexueyuan.com/course/677_1.html?ss=1 1. Google大数据与Hadoop对比 功能 Google Hadoop 存储 GFS HDFS 计算 MapReduce MapReduce 查询 BigTable HBase 2. 大数据分类 2.1 根据数据类型分类 2.1.1 结构化数据 能够用数据或统一的结构加以表示,人们称之为结构化数据,如数字、符号。传统的关系数据模型,行数据,存储于数据库,可用二维表结构表示。 2.1.2 半结构化数据 所谓半结构化数据,就是介于完全结构化数据(如关系型数据库,面向对象数据库中的数据)和完全无结构的数据(如声音、图像文件等)之间的数据,XML、HTML文档就属于半结构化数据。它一般是自描述的,数据的结构和内容混在一起,没有明显的区分。 2.1.3 非结构化数据 非结构化数据库是指其字段长度可变,并且每隔字段的记录又可以由可重复或不可重复的子字段构成的数据库,用它不仅可以处理结构化数据(如数字、符号等信息)而且更适合处理非结构化数据(全文文本,图像,声音,影视,超媒体等信息)。 参考链接: https://zhidao.baidu.com/question/589302455243618045.html 2.2 根据处理时间跨度要求分类 2.2

Flume NG and HDFS

流过昼夜 提交于 2019-12-01 05:29:54
I am very new to hadoop , so please excuse the dumb questions. I have the following knowledge Best usecase of Hadoop is large files thus helping in efficiency while running mapreduce tasks. Keeping the above in mind I am somewhat confused about Flume NG. Assume I am tailing a log file and logs are produced every second, the moment the log gets a new line it will be transferred to hdfs via Flume. a) Does this mean that flume creates a new file on every line that is logged in the log file I am tailing or does it append to the existing hdfs file ?? b) is append allowed in hdfs in the first place?

小记---------FLUM负载均衡配置

匆匆过客 提交于 2019-12-01 01:42:19
sink group允许组织多个sink到一个实体上,sink processors能够提供在组内所有sink之间实现负载均衡的能力,而且在失败的情况下能够进行故障转移从一个sink到另一个sink,简单的说就是一个source对应一个,即多个sink,这里考虑的是可靠性与性能,即故障转移与负载均衡的设置 Property Name Default Description sinks - 以空格分割sink列表 processor.type default 组件类型名称,需要是默认值,故障转移或负载平衡 Processors类型:default(默认:无)、failover(故障转移)和load_balance(负载均衡),目前自定义processors还不支持 例: a1.sinkgroups=g1 a1.sinkgroups.g1.sinks=k1 k2 a1.sinkgroups.g1.processor.type=load_balance Default Sink Processor 接收单一的sink,不强制用户为sink创建processor。就是原始的写法 Failover Sink Processor(故障转移) 会通过配置维护一个优先级列表,保证每一个有效的事件都会被处理,故障转移的工作原理是将连续失败sink分配到一个池中,被分配一个冷冻期,在冷冻期内

Flume学习笔记

孤者浪人 提交于 2019-12-01 01:21:04
什么是Flume? Flume是Cloudera提供的一个高可用的,高可靠的,分布式海量日志采集,聚合的传输软件 2. Flume架构 3.Flume的运行机制 Flume的核心角色是agent,本身是一个java进程,一般运行在日志收集节点,每个agent有以下三个组件 source:采集源数据,跟数据源对接,获取数据。 sink:下沉地,将采集的数据送往目的地,一般是下一个agent或者是直接存储到一个文件系统 channle:传递数据管道,起到缓冲作用。】 在整个过程中流动的是event,它是flume内部传输数据最基本的单位,event将传输的数据进行封装,其中包括event header,event body,event信息,event信息就是flume收集到的日志记录。 4. 采集目录到hdfs 根据需求,在服务器下面的某个目录下会不断的产生新数据,我们需要收集这些新产生数据,然后上传到hdfs。 采集源source:spooldir 下沉目标sink:hdfs sink 传递通道channel:可用file channel 也可以用内存channel # 三大组件的名字 a1.sources = r1 a1.sinks = k1 a1.channels = c1 # Describe/configure the source ##注意:不能往监控目中重复丢同名文件