You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2018/08/21 05:22:00 UTC
[jira] [Created] (HBASE-21080) Collectors.toMap uses a byte [] for
key
stack created HBASE-21080:
-----------------------------
Summary: 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
Good one found by a jxray spelunking [~misha@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)