You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "mokai (Jira)" <ji...@apache.org> on 2021/03/27 10:19:00 UTC
[jira] [Assigned] (HBASE-25705) Convert proto to RSGroupInfo is
costly
[ https://issues.apache.org/jira/browse/HBASE-25705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
mokai reassigned HBASE-25705:
-----------------------------
Assignee: mokai
> 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
>
> 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)