增加一下信息 说明优先往哪台机器上写数据,如果优先级高的服务宕机了,会向优先级低的服务上写.
a1.sources = r1 a1.sinks = k1 k2 a1.channels = c1 # Describe/configure the source a1.sources.r1.type = exec a1.sources.r1.command = tail -F /opt/test.log # define sinkgroups a1.sinkgroups=g1 a1.sinkgroups.g1.sinks=k1 k2 a1.sinkgroups.g1.processor.type=failover a1.sinkgroups.g1.processor.k1=10 #优先级 a1.sinkgroups.g1.processor.k2=5 a1.sinkgroups.g1.processor.maxpenalty=10000 # Describe the sink 1 a1.sinks.k1.type = avro a1.sinks.k1.hostname=192.168.13.132 a1.sinks.k1.port=41414 # Describe the sink 2 a1.sinks.k2.type = avro a1.sinks.k2.hostname=192.168.13.133 a1.sinks.k2.port=41414 # Use a channel which buffers events in memory a1.channels.c1.type = memory a1.channels.c1.capacity = 1000 a1.channels.c1.transactionCapacity = 100 # Bind the source and sink to the channel a1.sources.r1.channels = c1 a1.sinks.k1.channel = c1 a1.sinks.k2.channel = c1
将该段落信息加到
案例15:avro 远程访问内容中的内容 就能看到效果
时间: 2024-10-11 14:02:51