virajjasani commented on pull request #3438:
URL: https://github.com/apache/hbase/pull/3438#issuecomment-871500621
> Also, the "localhost" part is suspicious, why does AM look for a localhost
address?
It is `BOGUS_SERVER_NAME`. AM tries to put it in `FAILED_OPEN` state after
getting one:
```
private void processBogusAssignments(Map<ServerName, List<HRegionInfo>>
bulkPlan) {
if (bulkPlan.containsKey(LoadBalancer.BOGUS_SERVER_NAME)) {
// Found no plan for some regions, put those regions in RIT
for (HRegionInfo hri : bulkPlan.get(LoadBalancer.BOGUS_SERVER_NAME)) {
regionStates.updateRegionState(hri, State.FAILED_OPEN);
}
bulkPlan.remove(LoadBalancer.BOGUS_SERVER_NAME);
}
}
```
And it is `RSGroupBasedLoadBalancer` that tries to add it:
```
//if not server is available assign to bogus so it ends up in RIT
if(!assignments.containsKey(LoadBalancer.BOGUS_SERVER_NAME)) {
assignments.put(LoadBalancer.BOGUS_SERVER_NAME, new
ArrayList<HRegionInfo>());
}
assignments.get(LoadBalancer.BOGUS_SERVER_NAME).add(region);
```
and similar logic is available few other places in
`RSGroupBasedLoadBalancer`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]