Skip to content

Instantly share code, notes, and snippets.

@yangl
Last active December 13, 2022 07:41
Show Gist options
  • Save yangl/63e02ff7daaac3e6a4d06c3327bea65e to your computer and use it in GitHub Desktop.
Save yangl/63e02ff7daaac3e6a4d06c3327bea65e to your computer and use it in GitHub Desktop.
Apache Pulsar 机架感知策略 --networkTopologyScript
# bookie-1
10.207.128.13 /SZ/FT
10.207.128.14 /SZ/FT
10.207.128.15 /SZ/FT
10.207.128.16 /SZ/FT
10.207.128.17 /SZ/FT
# bookie-2
10.206.128.204 /SZ/NS
10.206.128.205 /SZ/NS
10.206.128.206 /SZ/NS
10.206.128.210 /SZ/NS
10.206.128.211 /SZ/NS
# bookie-3
10.206.128.154 /SZ/LH
10.206.128.155 /SZ/LH
10.206.128.156 /SZ/LH
10.206.128.157 /SZ/LH
10.206.128.158 /SZ/LH
#!/bin/bash
bk_rack=`cat /app/conf/bookkeeper-topology.conf |grep $@|awk '{print $2}'`
if [[ -z "$bk_rack" ]]; then
bk_rack=/SZ/DEFAULT
fi
echo $bk_rack
bookkeeper_ensemblePlacementPolicy=org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicy
bookkeeper_reppDnsResolverClass=org.apache.bookkeeper.net.ScriptBasedMapping
bookkeeper_networkTopologyScriptFileName=/app/conf/bookkeeper-topology.sh
bookkeeper_enforceMinNumRacksPerWriteQuorum=true
bookkeeper_minNumRacksPerWriteQuorum=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment