flume複数source sinks channel構成レコード
2487 ワード
a1.sources = r1 r2
a1.sinks = k1 k2
a1.channels = c1 c2
##### source
a1.sources.r1.type =spooldir
a1.sources.r1.spoolDir=/urldata/t_url/
##a1.sources.r1.fileSuffix = .COMPLETED
##
a1.sources.r1.deletePolicy= immediate
a1.sources.r1.decodeErrorPolicy=IGNORE
a1.sources.r1.checkperiodic = 50
# Describe the sink
##### sink
a1.sinks.k1.type = hbase
a1.sinks.k1.table = t_url
a1.sinks.k1.columnFamily = info
a1.sinks.k1.batchSize = 1000
a1.sinks.k1.serializer = org.apache.flume.sink.hbase.RegexHbaseEventSerializer
## |
a1.sinks.k1.serializer.colNames = rid,dir,username,sip,sport,dip,dport,bytes,starttime,action,url,descid,domain,type,subtype,words,line,platform,browser,grpids,referer,termtype
a1.sinks.k1.serializer.regex = ([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)
##### channels
a1.sinks.k1.channel = memoryChannel
a1.channels.c1.type = memory
a1.channels.c1.capacity = 100000
a1.channels.c1.transactionCapacity = 1000
#### Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
##### source
a1.sources.r2.type =spooldir
a1.sources.r2.spoolDir=/urldata/ts_traffic/
#a1.sources.r2.fileSuffix = .COMPLETED
a1.sources.r2.deletePolicy= immediate
a1.sources.r2.checkperiodic = 50
a1.sources.r2.decodeErrorPolicy=IGNORE
# Describe the sink
a1.sinks.k2.type = hbase
a1.sinks.k2.table = ts_traffic
a1.sinks.k2.columnFamily = info
a1.sinks.k2.batchSize = 1000
a1.sinks.k2.serializer = org.apache.flume.sink.hbase.RegexHbaseEventSerializer
a1.sinks.k2.serializer.colNames = rid,dir,username,sip,sport,dip,dport,bytes,starttime,action,url,descid,domain,type,subtype,words,line,platform,browser,grpids,referer,termtype
a1.sinks.k2.serializer.regex = ([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)\\|([^\\|]*)
##### channels
a1.sinks.k2.channel = memoryChannel
a1.channels.c2.type = memory
a1.channels.c2.capacity = 100000
a1.channels.c2.transactionCapacity = 1000
# Bind the source and sink to the channel
a1.sources.r2.channels = c2
a1.sinks.k2.channel = c2