1、结构图
2、conf
bigdata111
a1.sources = r1
a1.channels = c1 c2
a1.sinks = k1 k2
a1.sources.r1.type = top.gujm.flume.LoggerSource
#ÿ¸ô3Ãë·¢ËÍÒ»´Îevent
a1.sources.r1.sleep = 3000
a1.sources.r1.selector.type = replicating
a1.channels.c1.type = memory
a1.channels.c2.type = memory
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = bigdata112
a1.sinks.k1.port = 4141
a1.sinks.k2.type = avro
a1.sinks.k2.hostname = bigdata113
a1.sinks.k2.port = 4141
a1.sources.r1.channels = c1 c2
a1.sinks.k1.channel = c1
a1.sinks.k2.channel = c2
bigdata112
a1.sources = r1
a1.channels = c1
a1.sinks = k1
a1.sources.r1.type = avro
a1.sources.r1.bind = bigdata112
a1.sources.r1.port = 4141
a1.channels.c1.type = memory
a1.sinks.k1.type = hdfs
a1.sinks.k1.hdfs.path = hdfs://bigdata111:9000/flume/fanout
a1.sinks.k1.hdfs.filePrefix = log-
a1.sinks.k1.hdfs.useLocalTimeStamp = true
a1.sinks.k1.hdfs.rollSize = 134217728
a1.sinks.k1.hdfs.rollCount = 1000
#1小时滚动一次
a1.sinks.k1.hdfs.rollInterval = 3600
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
bigdata113
a1.sources = r1
a1.channels = c1
a1.sinks = k1
a1.sources.r1.type = avro
a1.sources.r1.bind = bigdata113
a1.sources.r1.port = 4141
a1.channels.c1.type = memory
a1.sinks.k1.type = top.gujm.flume.LoggerSink
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1