master:
]# ./bin/flume-ng agent --conf conf --conf-file ./conf/flume-client.properties_loadbalance --name a1 -Dflume.root.logger=INFO,console
slave1:
]# ./bin/flume-ng agent --conf conf --conf-file ./conf/flume-server.properties --name a1 -Dflume.root.logger=INFO,console
slave2:
]# ./bin/flume-ng agent --conf conf --conf-file ./conf/flume-server.properties --name a1 -Dflume.root.logger=INFO,console
发送数据:
for i in `seq 1 100` ;do echo '====> '$i >> 2.log ;done
结果:负载均衡实现了 数据发送轮训方式 均匀的发送到sink端
master:
# Name the components on this agent
a1.sources = r1
a1.sinks = k1 k2
a1.channels =