You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Huaxiang Sun (Jira)" <ji...@apache.org> on 2021/01/05 17:22:00 UTC

[jira] [Commented] (HBASE-25368) Filter out more invalid encoded name in isEncodedRegionName(byte[] regionName)

    [ https://issues.apache.org/jira/browse/HBASE-25368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17259073#comment-17259073 ] 

Huaxiang Sun commented on HBASE-25368:
--------------------------------------

Thanks [~zhangduo]. I remember that I got a pass from PR run, probably it did not trigger hbase-server module unittests. Let me look into it and update accordingly.

> Filter out more invalid encoded name in isEncodedRegionName(byte[] regionName) 
> -------------------------------------------------------------------------------
>
>                 Key: HBASE-25368
>                 URL: https://issues.apache.org/jira/browse/HBASE-25368
>             Project: HBase
>          Issue Type: Improvement
>          Components: Client
>            Reporter: Huaxiang Sun
>            Assignee: Huaxiang Sun
>            Priority: Major
>
> {code:java}
> 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;
> }
> Right now, if it passes in an table name, it still thinks  it is a encoded region name and will result in unnecessary registry query for meta regions. This can be avoided if table names can be filtered out early in this method.{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)