HBASE-20717 Implement CCSMap - a better concurrent map with compacted data structure#2138
HBASE-20717 Implement CCSMap - a better concurrent map with compacted data structure#2138Reidddddd wants to merge 2 commits intoapache:ccsmapfrom
Conversation
|
First draft:
|
|
In fact, I haven't go through the details yet. I'm thinking let's make v1 draft first, so members can review the details together. |
| import java.util.Collections; | ||
| import java.util.Iterator; | ||
| import java.util.List; | ||
| import java.util.Random; |
There was a problem hiding this comment.
Oh, I should remove this line...
| return theUnsafe.getByte(buf.array(), BYTE_ARRAY_BASE_OFFSET + buf.arrayOffset() + offset); | ||
| } | ||
| } | ||
|
|
|
TestCompactedConcurrentSkipList.java passed on local, while TestCompactedTypeHelper failed |
|
💔 -1 overall
This message was automatically generated. |
hbase-server/src/test/java/org/apache/hadoop/hbase/ccsmap/TestCompactedConcurrentSkipList.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| @Override | ||
| public KVPair<Integer, String> decomposite(byte[] data, int offset, int len) { |
There was a problem hiding this comment.
Looking up the meaning of decomposite, I don't think it reflects the action here.
Was the author intended to say 'decompose' or deserialize ?
hbase-server/src/main/java/org/apache/hadoop/hbase/ccsmap/SpaceNotEnoughExcpetion.java
Outdated
Show resolved
Hide resolved
| b.doBehavior(mc); | ||
| long lat = System.nanoTime() - start; | ||
| performance.addOps(b.getName(), lat); | ||
| if (mc.viewOps > 20) { // up to 20 view operations |
There was a problem hiding this comment.
I wonder why the reset is called every 20 view operations.
| mc.reset(); | ||
| } | ||
| } | ||
| System.out.println("There are " + mc.mainMap2.size() |
There was a problem hiding this comment.
Is it possible to establish baseline so that we can make some assertion here ?
I am not sure who would periodically examine these output .
| public void testRandomBehaviorParallelly() throws InterruptedException { | ||
| final int RANGE = 32768; | ||
| final int INIT_DATA = 50000; | ||
| final int THREAD = 8; |
There was a problem hiding this comment.
Should the thread count be related to number of cores for the processor ?
There was a problem hiding this comment.
Somehow what if the vm or poor machine only have 1 processor? although I already changed to availableProcessors methods..
|
Hi @tedyu (waving), long time no see! I addressed parts of your reviews, some of them I'm not sure as well. Most of codes can't explain itself, and as we get deep, I believe weird codes may appear more. And I will address them after we have some discussions, like the method decomposite()... |
|
It would be good to involve one of the original developers so that we get their buy-in for the changes. Thanks |
|
I found that the patch I based on was roughly contributed from Andrew. |
|
Temporarily close this PR. |
|
Since Alibaba has their own JVM, we should establish benchmark for CCSMap first. |
No description provided.