码迷,mamicode.com
首页 > Web开发 > 详细

flume1.5

时间:2014-10-18 00:33:46      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:for   sp   文件   on   cti   log   amp   ad   ef   

写入hdfs

a1.channels.c1.type = memory

# Define an Avro source called r1 on a1 and tell it
# to bind to 0.0.0.0:41414. Connect it to channel c1.
a1.sources.r1.channels = c1
a1.sources.r1.type = avro
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 41414
a1.sinks.k1.type = hdfs
a1.sinks.k1.channel = c1
a1.sinks.k1.hdfs.path = hdfs://192.168.0.200:9000/user/hadoop/input/web
a1.sinks.k1.hdfs.filePrefix = access-%Y-%m-%d
a1.sinks.k1.hdfs.fileSuffix = .log
a1.sinks.k1.hdfs.useLocalTimeStamp = true
a1.sinks.k1.hdfs.fileType = DataStream
a1.sinks.k1.hdfs.writeFormat = Text
a1.sinks.k1.hdfs.rollSize = 0
a1.sinks.k1.hdfs.rollInterval= 0
a1.sinks.k1.hdfs.rollCount = 0
#超时之后不活跃的文件关
a1.sinks.k1.hdfs.idleTimeout = 0

#
# Finally, now that we‘ve defined all of our components, tell
# a1 which ones we want to activate.
a1.channels = c1
a1.sources = r1
a1.sinks = k1

 

 bin/flume-ng  agent -c conf/ -f conf/server.conf -n a1 -Dflume.root.logger=DEBUG,console

 

flume1.5

标签:for   sp   文件   on   cti   log   amp   ad   ef   

原文地址:http://www.cnblogs.com/DDSys/p/4032294.html

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