yangl opened a new pull request #10715:
URL: https://github.com/apache/pulsar/pull/10715


   ### Motivation
   
   Since the current  ZkIsolatedBookieEnsemblePlacementPolicy rack 
configuration metadata is stored on the zookeeper cluster where the broker is 
located, this causes the bookkeeper to not get the rack information correctly 
when using a separate zookeeper cluster 
(**--existing-bk-metadata-service-uri**).
   
   ```shell
   --cluster test-pulsar-1 \
   --zookeeper 10.207.128.13:2181/test-pulsar-1 \
   --configuration-store 110.207.128.13:2181/test-pulsar-1 \
   --existing-bk-metadata-service-uri 
"zk+hierarchical://10.206.128.154:2181;10.206.128.155:2181;10.206.128.156:2181;10.206.128.157:2181;10.206.128.158:2181/bk-ledgers"
 \
   --web-service-url http://pulsar.sf.com:8080 \
   --broker-service-url pulsar://pulsar.sf.com:16650
   ```
   ```xml
   
ensemblePlacementPolicy=org.apache.pulsar.zookeeper.ZkIsolatedBookieEnsemblePlacementPolicy
   reppDnsResolverClass=org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping
   ```
   ```
   ./pulsar-admin --admin-url http://10.206.64.12:18080 --auth-params 
$PULSAR_AUTH_PARAMS --auth-plugin $PULSAR_AUTH_PLUGIN bookies racks-placement
   "g1    {bookie11:3181=BookieInfo(rack=r1, hostname=null), 
bookie12:3181=BookieInfo(rack=r1, hostname=null), 
bookie13:3181=BookieInfo(rack=r1, hostname=null), 
bookie14:3181=BookieInfo(rack=r1, hostname=null), 
bookie15:3181=BookieInfo(rack=r1, hostname=null)}"
   "g2    {bookie21:3181=BookieInfo(rack=r2, hostname=null), 
bookie22:3181=BookieInfo(rack=r2, hostname=null), 
bookie23:3181=BookieInfo(rack=r2, hostname=null), 
bookie24:3181=BookieInfo(rack=r2, hostname=null), 
bookie25:3181=BookieInfo(rack=r2, hostname=null)}"
   "g3    {bookie31:3181=BookieInfo(rack=r3, hostname=null), 
bookie32:3181=BookieInfo(rack=r3, hostname=null), 
bookie33:3181=BookieInfo(rack=r3, hostname=null), 
bookie34:3181=BookieInfo(rack=r3, hostname=null), 
bookie35:3181=BookieInfo(rack=r3, hostname=null)}"
   ```
   
   but the bookkeeper log show the rack info doesn't match the config **r1 r2 
r3**
   ```
   14:19:00.139 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie14:3181
   14:19:00.139 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie32:3181
   14:19:00.139 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie35:3181
   14:19:00.140 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie11:3181
   14:19:00.140 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie22:3181
   14:19:00.140 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie12:3181
   14:19:00.141 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie25:3181
   14:19:00.141 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie33:3181
   14:19:00.141 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie23:3181
   14:19:00.142 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie15:3181
   14:19:00.142 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie31:3181
   14:19:00.142 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie24:3181
   14:19:00.143 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie21:3181
   14:19:00.143 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie34:3181
   14:19:00.143 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  
org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: 
/default-rack/bookie13:3181
   ```
   
   ### Modifications
   
   1. chang the rack config to the bookkeeper's zookeeper.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to