You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/02/23 13:55:38 UTC
[GitHub] [hbase] mwkang edited a comment on issue #1193: HBASE-23561 Look up
of Region in Master by encoded region name is O(n)
mwkang edited a comment on issue #1193: HBASE-23561 Look up of Region in Master by encoded region name is O(n)
URL: https://github.com/apache/hbase/pull/1193#issuecomment-590070993
I think the current code may have different values for the two maps.
What do you think about changing it like below?
```java
RegionStateNode createRegionStateNode(RegionInfo regionInfo) {
RegionStateNode node = regionsMap.computeIfAbsent(regionInfo.getRegionName(), key -> new RegionStateNod(regionInfo, regionInTransition));
encodedRegionsMap.putIfAbsent(node.getRegionInfo().getEncodedName(), node);
return node;
}
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services