案例17:avro 负载均衡加优先级
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了案例17:avro 负载均衡加优先级相关的知识,希望对你有一定的参考价值。
增加一下信息 说明优先往哪台机器上写数据,如果优先级高的服务宕机了,会向优先级低的服务上写.
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 远程访问内容中的内容 就能看到效果
以上是关于案例17:avro 负载均衡加优先级的主要内容,如果未能解决你的问题,请参考以下文章