Hadoop实战-Flume之Source multiplexing(十五)

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

# Describe/configure the source
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

# Describe the sink
a1.sinks.k1.type =file_roll
a1.sinks.k1.sink.directory=/home/chenyun/data/flume/file_sinke1

a1.sinks.k2.type =file_roll
a1.sinks.k2.sink.directory=/home/chenyun/data/flume/file_sinke2

# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100

a1.channels.c2.type = memory
a1.channels.c2.capacity = 1000
a1.channels.c2.transactionCapacity = 100

# Bind the source and sink to the channel
a1.sources.r1.channels = c1 c2
a1.sources.r1.interceptors = i1
a1.sources.r1.interceptors.i1.type = regex_extractor 
a1.sources.r1.interceptors.i1.regex = (\\w+):(\\w+):(\\w+)
a1.sources.r1.interceptors.i1.serializers = s1 s2 s3
a1.sources.r1.interceptors.i1.serializers.s1.name = one
a1.sources.r1.interceptors.i1.serializers.s2.name = two
a1.sources.r1.interceptors.i1.serializers.s3.name = three
a1.sources.r1.selector.type = multiplexing
a1.sources.r1.selector.header = one
a1.sources.r1.selector.mapping.hadoop = c1
a1.sources.r1.selector.default = c2
a1.sinks.k1.channel=c1
a1.sinks.k2.channel = c2

 

posted on 2017-05-16 22:50  简单明了  阅读(391)  评论(0编辑  收藏  举报