[ https://issues.apache.org/jira/browse/BOOKKEEPER-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15708558#comment-15708558 ]
Hudson commented on BOOKKEEPER-964: ----------------------------------- FAILURE: Integrated in Jenkins build bookkeeper-master #1582 (See [https://builds.apache.org/job/bookkeeper-master/1582/]) BOOKKEEPER-964: Add concurrent maps and sets for primitive types (sijie: rev ecbb053e6e873859507e247cae727f4bc8b9f7fa) * (add) bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentOpenHashMap.java * (add) bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashSet.java * (add) bookkeeper-server/src/test/java/org/apache/bookkeeper/util/collections/ConcurrentLongLongPairHashMapTest.java * (add) bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongLongHashMap.java * (add) bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentOpenHashSet.java * (add) bookkeeper-server/src/test/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMapTest.java * (add) bookkeeper-server/src/test/java/org/apache/bookkeeper/util/collections/ConcurrentOpenHashMapTest.java * (add) bookkeeper-server/src/test/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashSetTest.java * (add) bookkeeper-server/src/test/java/org/apache/bookkeeper/util/collections/ConcurrentOpenHashSetTest.java * (add) bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongLongPairHashMap.java * (add) bookkeeper-server/src/test/java/org/apache/bookkeeper/util/collections/ConcurrentLongLongHashMapTest.java * (add) bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java > Add concurrent maps and sets for primitive types > ------------------------------------------------ > > Key: BOOKKEEPER-964 > URL: https://issues.apache.org/jira/browse/BOOKKEEPER-964 > Project: Bookkeeper > Issue Type: Improvement > Reporter: Matteo Merli > Assignee: Matteo Merli > Fix For: 4.5.0 > > > In BookKeeper there are many instances of maps and sets that use ledger id > and entry ids as keys or values. JDK concurrent collections have the overhead > of boxing all the primitive values into objects (eg: long --> Long) that would > need to be allocated from the heap. In addition to that, JDK map > implementations > are closed hash tables and they will require at least one more allocation to > hold > the linked-list/tree node. > There are already available libraries that offer primitive collections with > zero-allocation, but none of these support concurrent maps/sets. > We have added a handful of specializations, all based on the same > implementation > idea. We have a hash table which is broken down into multiple sections. Each > sections, on its own, is an open hash table with linear probing, protected by > a stamped lock. > All insertions, lookups and iterations on these collections are allocation > free. > {noformat} > ConcurrentLongHashMap: Map<long, Object> > ConcurrentLongHashSet: Set<long> > ConcurrentLongLongHashMap: Map<long, long> > ConcurrentLongLongPairHashMap: Map< Pair<long, long>, Pair<long, long> > > ConcurrentOpenHashMap: Map<Object, Object> > ConcurrentOpenHashSet: Set<Object> > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)