[ 
https://issues.apache.org/jira/browse/HBASE-25705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Stack resolved HBASE-25705.
-----------------------------------
    Fix Version/s: 3.0.0-alpha-1
     Hadoop Flags: Reviewed
       Resolution: Fixed

Merged to master branch. It won't backport w/o complaint. Open sub-task if you 
have PRs for backports [~mokai87]. Thanks for the PR.

> Convert proto to RSGroupInfo is costly
> --------------------------------------
>
>                 Key: HBASE-25705
>                 URL: https://issues.apache.org/jira/browse/HBASE-25705
>             Project: HBase
>          Issue Type: Improvement
>          Components: rsgroup
>    Affects Versions: 3.0.0-alpha-1, 2.2.3
>            Reporter: mokai
>            Assignee: mokai
>            Priority: Minor
>             Fix For: 3.0.0-alpha-1
>
>
> Convert RSGroupProtos.RSGroupInfo to RSGroupInfo is costly if the RSGroup has 
> too many RSs and tables. 
> We can use parallelStream to handle the HBaseProtos.ServerName list and 
> TableProtos.TableName list in ProtubufUtil#toGroupInfo as blow.
> {quote}Collection<Address> addresses = proto.getServersList()
>  .parallelStream()
>  .map(server -> Address.fromParts(server.getHostName(), server.getPort()))
>  .collect(Collectors.toList());
> Collection<TableName> tables = proto.getTablesList()
>  .parallelStream()
>  .map(tableName -> ProtobufUtil.toTableName(tableName))
>  .collect(Collectors.toList());
> {quote}
> Get the RSGroupInfo which has 9 RS and 20k tables, the time cost reduced from 
> 6038 ms to 684 ms.



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

Reply via email to