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

Duo Zhang commented on HBASE-21080:
-----------------------------------

You mean HBASE-21081 sir?

> Collectors.toMap uses a byte [] for key
> ---------------------------------------
>
>                 Key: HBASE-21080
>                 URL: https://issues.apache.org/jira/browse/HBASE-21080
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Priority: Major
>
> Good one found by a jxray spelunking [~mi...@cloudera.com].
> The below added by HBASE-19496 is making hashmaps with byte []s for keys 
> (byte []'s don't do hashCode/Equals; usually when we have byte []'s for keys, 
> we do ConcurrentMap and pass a Comparator in constructor that knows how to do 
> byte []s).
> {code}
> .setStoreSequenceIds(regionLoadPB.getStoreCompleteSequenceIdList().stream()
>   .collect(Collectors.toMap(
>     (ClusterStatusProtos.StoreSequenceId s) -> 
> s.getFamilyName().toByteArray(),
>       ClusterStatusProtos.StoreSequenceId::getSequenceId)))
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to