码迷,mamicode.com
首页 > 其他好文 > 详细

flum下载安装

时间:2018-02-08 20:07:20      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:user   memory   apache   ack   gen   val   city   for   other   

1.环境

centos,apache-flume-1.6.0-bin.tar.gz

2.解压

进入conf/目录,创建*.properties文件

agent.sources = seqGenSrc
agent.channels = memoryChannel
agent.sinks = loggerSink

# For each one of the sources, the type is defined
agent.sources.seqGenSrc.type = exec
agent.sources.seqGenSrc.command=tail -f /data/www/logs/apps/userinfo/info.log
# The channel can be defined as follows.
agent.sources.seqGenSrc.channels = memoryChannel

# Each sinks type must be defined
agent.sinks.loggerSink.type = org.apache.flume.sink.kafka.KafkaSink
agent.sinks.loggerSink.topic = userinfoTopic
agent.sinks.loggerSink.brokerList = 10.10.12.173:9092
agent.sinks.loggerSink.batchSize = 20
agent.sinks.loggerSink.requiredAcks = 1
#Specify the channel the sink should use
agent.sinks.loggerSink.channel = memoryChannel

# Each channels type is defined.
agent.channels.memoryChannel.type = memory

# Other config values specific to each type of channel(sink or source)
# can be defined as well
# In this case, it specifies the capacity of the memory channel
agent.channels.memoryChannel.capacity = 100

3.启动

进入bin目录

./flume-ng agent --conf ../conf --conf-file ../conf/*.properties --name agent -Dflume.root.logger=INFO,console

 

flum下载安装

标签:user   memory   apache   ack   gen   val   city   for   other   

原文地址:https://www.cnblogs.com/yangxianyu/p/8432581.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!