设为首页 加入收藏

TOP

Flume实现日志文件夹数据加载到HDFS
2019-05-03 14:10:36 】 浏览:64
Tags:Flume 实现 日志 文件夹 数据 加载 HDFS
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/h359310652/article/details/78593809

Flume是一种分布式,可靠和可用的服务,用于高效收集,聚合和移动大量日志数据。 它具有基于数据流的简单和可伸缩的架构。 它具有可靠性机制和故障切换和恢复机制的鲁棒性和容错能力。
vi corp_base_info.conf

a1.sources = r1
a1.sinks = k1
a1.channels = c1

# Describe/configure the source
a1.sources.r1.type = spooldir
a1.sources.r1.spoolDir=/home/flume/testdata/test
a1.sources.r1.includePattern=^AUEIC.C_CONS([0-9a-zA-Z]|[._-])*$
a1.sources.r1.ignorePattern=^.*COMPLETED$
a1.sources.r1.inputCharset=UTF-8
a1.sources.r1.pollDelay=300000 #5分针采集一次
加粗的属性1.7以上才有

#Use a channel which buffers events in memory

a1.channels=c1
a1.channels.c1.capacity=1000000
a1.channels.c1.transactionCapacity=1000000
a1.channels.c1.type=memory

#Describe the sink
a1.sinks=k1
a1.sinks.k1.channel=c1
a1.sinks.k1.hdfs.fileType=DataStream
a1.sinks.k1.hdfs.path=hdfs://mynameservice/apps/hive/warehouse/flume.db/corp_base_info/ymd=%Y%m%d
a1.sinks.k1.hdfs.rollCount=0
a1.sinks.k1.hdfs.rollInterval=0
a1.sinks.k1.hdfs.rollSize=10240000
a1.sinks.k1.hdfs.idleTimeout=60
a1.sinks.k1.hdfs.writeFormat=Text
a1.sinks.k1.type=hdfs

# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Flume 自定义source   -- S.. 下一篇flume 1.7 TailDir source重复获..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目