saintstack commented on a change in pull request #2753:
URL: https://github.com/apache/hbase/pull/2753#discussion_r539859613
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
##########
@@ -363,7 +363,23 @@ static TableName getTable(final byte [] regionName) {
@InterfaceAudience.Private // For use by internals only.
public static boolean isEncodedRegionName(byte[] regionName) {
// If not parseable as region name, presume encoded. TODO: add stringency;
e.g. if hex.
- return parseRegionNameOrReturnNull(regionName) == null &&
regionName.length <= MD5_HEX_LENGTH;
+ if (parseRegionNameOrReturnNull(regionName) == null) {
+ if (regionName.length > MD5_HEX_LENGTH) {
+ return false;
+ } else if (regionName.length == MD5_HEX_LENGTH) {
+ return true;
Review comment:
THanks for explanation. Shove this up in the JIRA description? Its good.
Thanks.
----------------------------------------------------------------
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:
[email protected]