virajjasani commented on a change in pull request #4276:
URL: https://github.com/apache/hbase/pull/4276#discussion_r835745836
##########
File path:
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
##########
@@ -156,4 +156,12 @@
*/
default void updateBalancerLoadInfo(Map<TableName, Map<ServerName,
List<RegionInfo>>>
loadOfAllTable){}
+
+ /**
+ * Check if the ServerName is bogus.
+ * @param sn server name to be checked
+ */
+ default boolean isBogusServerName(ServerName sn) {
Review comment:
Can be removed once we use `BOGUS_SERVER_NAME` directly in TRSP
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/TransitRegionStateProcedure.java
##########
@@ -199,7 +199,7 @@ private void queueAssign(MasterProcedureEnv env,
RegionStateNode regionNode)
private void openRegion(MasterProcedureEnv env, RegionStateNode regionNode)
throws IOException {
ServerName loc = regionNode.getRegionLocation();
- if (loc == null) {
+ if (loc == null ||
env.getMasterServices().getLoadBalancer().isBogusServerName(loc)) {
Review comment:
I think we should directly check with `BOGUS_SERVER_NAME.equals(loc)`
here. `BOGUS_SERVER_NAME` is anyways public.
--
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]