flume 多个source sinks channel 配置记录

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chenzhenguo123/article/details/84578957
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

猜你喜欢

转载自blog.csdn.net/chenzhenguo123/article/details/84578957