Flume | 数据监控以及传输性能优化

测试环境

阿里云学生机:2核4G 1Mbps
Vm虚拟机:2核6G 100Mbps
数据量: 380w+
测试source: spooldir
测试channel: memory channel
测试sink: hdfs sink

初始配置文件(flume默认值)

test1.conf
a1.sources = source1
a1.channels = channel1
a1.sinks = sink1 sink2 sink3

#Define a memory channel called channel1 on a1
a1.channels.channel1.type = memory
a1.channels.channel1.capacity = 100
a1.channels.channel1.transactionCapacity = 100

# Define an Exec source called source1 on a1 and tell it
a1.sources.source1.channels = channel1
a1.sources.source1.type = spooldir
a1.sources.source1.spoolDir = /home/hadoop/Downloads/taobao
a1.sources.source1.batchSize = 100

#Define an File Roll Sink called sink1 on a1
a1.sinks.sink1.channel = channel1
a1.sinks.sink1.type = hdfs
#sink类型是hdfs
a1.sinks.sink1.hdfs.path = hdfs://172.17.51.183:9000/from-WebServer/
#sink接收到源数据后写到哪个目录下面
a1.sinks.sink1.hdfs.filePrefix = log.
#写入hdfs里面的文件前缀
a1.sinks.sink1.hdfs.rollInterval = 30
#多少秒产生一个新的文件,这里是30秒产生一个新的文件
a1.sinks.sink1.hdfs.rollSize = 134200000
#rollSize设置为0表示不会根据文件大小滚动切割
a1.sinks.sink1.hdfs.rollCount = 0
#根据写入文件的event数量来滚动,0就是不根据这个滚动。
a1.sinks.sink1.hdfs.minBlockReplicas = 1
# 指定每个HDFS块的最小数量的副本。 如果未指定,则它来自类路径中的默认Hadoop配置。</
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值