123456789101112131415161718192021222324252627282930313233343536 |
- a1.channels.c1.type = file
- a1.channels.c1.checkpointDir = /data/flume_data/checkpoint
- a1.channels.c1.dataDirs = /data/flume_data/data
-
- a1.channels.c2.type = org.apache.flume.channel.kafka.KafkaChannel
- #a1.channels.c2.transactionCapacity = 100000
- #a1.channels.c2.capacity = 10000000
- a1.channels.c2.brokerList = 10.26.27.212:8092,10.26.22.76:8092,10.26.22.72:8092,10.26.22.73:8092,10.26.22.74:8092
- a1.channels.c2.topic = home_easou_com_nginx
- a1.channels.c2.zookeeperConnect = 10.26.27.212:2181,10.26.22.76:2181,10.26.22.72:2181,10.26.22.73:2181,10.26.22.74:2181
- #a1.channels.c2.write-timeout = 150
- #a1.channels.c2.keep-alive = 260
- # Define an Avro source called r1 on a1 and tell it
- # to bind to 0.0.0.0:41414. Connect it to channel c1.
- #注意这里分出2个channel出来,一个是到k1,一个到k2
- #如果这里只出一个channel c1的话,下面2个sink channel都为c1,则消息就会随机分到2个sink上,而不是2个sink都有一份
- a1.sources.r1.channels = c1 c2
- a1.sources.r1.type = exec
- a1.sources.r1.command = tail -F /log/nginx/visit/access.log
- a1.sources.r1.restart = true
- a1.sources.r1.interceptors = i1 i2
- a1.sources.r1.interceptors.i1.type = timestamp
- a1.sources.r1.interceptors.i2.type = host
- a1.sources.r1.interceptors.i2.useIP = false
- #默认是replicationg,还有multiplexer
- #a1.sources.r1.selector.type = replicationg
- a1.sinks.k1.type = avro
- a1.sinks.k1.channel = c1
- a1.sinks.k1.hostname = 10.26.26.67
- a1.sinks.k1.port = 41414
- # Finally, now that we've defined all of our components, tell
- # a1 which ones we want to activate.
- a1.sources = r1
- a1.channels = c1 c2
- a1.sinks = k1
|