|
@@ -0,0 +1,45 @@
|
|
|
+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 = file
|
|
|
+a1.channels.c2.checkpointDir = /data/flume_data1/checkpoint
|
|
|
+a1.channels.c2.dataDirs = /data/flume_data1/data
|
|
|
+a1.channels.c2.transactionCapacity = 200000
|
|
|
+a1.channels.c2.capacity = 1000000
|
|
|
+a1.channels.c2.write-timeout = 250
|
|
|
+a1.channels.c2.keep-alive = 250
|
|
|
+
|
|
|
+
|
|
|
+# 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 /data/log/nginx/www/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
|
|
|
+
|
|
|
+a1.sinks.k2.type = avro
|
|
|
+a1.sinks.k2.channel = c2
|
|
|
+a1.sinks.k2.hostname = 10.26.33.113
|
|
|
+a1.sinks.k2.port = 41414
|
|
|
+a1.sinks.k2.request-timeout = 100000
|
|
|
+a1.sinks.k2.connect-timeout = 100000
|
|
|
+
|
|
|
+# 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 k2
|