源:
#agent1 name
agent1.channels = c1
agent1.sources = r1
agent1.sinks = k1 k2
#set gruop
agent1.sinkgroups = g1
#set channel
agent1.channels.c1.type = memory
#agent1.channels.c1.capacity = 1000
#agent1.channels.c1.transactionCapacity = 100
#agent1.sources.r1.type = netcat
#agent1.sources.r1.bind = localhost
#agent1.sources.r1.port = 44444
agent1.sources.r1.channels = c1
agent1.sources.r1.type = exec
agent1.sources.r1.command = tail -F /root/flume/runconf/a
# set sink1
agent1.sinks.k1.channel = c1
agent1.sinks.k1.type = avro
agent1.sinks.k1.hostname = localhost
agent1.sinks.k1.port = 52020
# set sink2
agent1.sinks.k2.channel = c1
agent1.sinks.k2.type = avro
agent1.sinks.k2.hostname = localhost
agent1.sinks.k2.port = 52021
#set sink group
agent1.sinkgroups.g1.sinks = k1 k2
#set failover
agent1.sinkgroups.g1.processor.type = failover
agent1.sinkgroups.g1.processor.priority.k1 = 10
agent1.sinkgroups.g1.processor.priority.k2 = 1
agent1.sinkgroups.g1.processor.maxpenalty = 10000
另外的两个配置
a1.sources = r1
a1.channels = c1
a1.sinks = k1
#set channel
a1.channels.c1.type = memory
#a1.channels.c1.capacity = 1000
#a1.channels.c1.transactionCapacity = 100
# other node,nna to nns
a1.sources.r1.type = avro
a1.sources.r1.bind = localhost
a1.sources.r1.port = 52020
a1.sources.r1.channels = c1
#set sink to hdfs
a1.sinks.k1.type = logger
a1.sinks.k1.channel=c1
----------
a2.sources = r1
a2.channels = c1
a2.sinks = k1
#set channel
a2.channels.c1.type = memory
#a2.channels.c1.capacity = 1000
#a2.channels.c1.transactionCapacity = 100
# other node,nna to nns
a2.sources.r1.type = avro
a2.sources.r1.bind = localhost
a2.sources.r1.port = 52021
a2.sources.r1.channels = c1
#set sink to hdfs
a2.sinks.k1.type = logger
a2.sinks.k1.channel=c1
网友评论