HBASE-3160 Use more intelligent priorities for PriorityCompactionQueue
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1028624 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b4eb5b505
commit
73727e534a
|
@ -104,11 +104,11 @@ public class TestPriorityCompactionQueue {
|
||||||
|
|
||||||
// test 1
|
// test 1
|
||||||
// check fifo w/priority
|
// check fifo w/priority
|
||||||
addRegion(pq, r1, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r2, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r3, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r4, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r5, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
|
||||||
|
|
||||||
getAndCheckRegion(pq, r1);
|
getAndCheckRegion(pq, r1);
|
||||||
getAndCheckRegion(pq, r2);
|
getAndCheckRegion(pq, r2);
|
||||||
|
@ -118,11 +118,11 @@ public class TestPriorityCompactionQueue {
|
||||||
|
|
||||||
// test 2
|
// test 2
|
||||||
// check fifo w/mixed priority
|
// check fifo w/mixed priority
|
||||||
addRegion(pq, r1, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r3, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r5, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
|
||||||
|
|
||||||
getAndCheckRegion(pq, r1);
|
getAndCheckRegion(pq, r1);
|
||||||
getAndCheckRegion(pq, r3);
|
getAndCheckRegion(pq, r3);
|
||||||
|
@ -136,7 +136,7 @@ public class TestPriorityCompactionQueue {
|
||||||
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r5, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
|
||||||
|
|
||||||
getAndCheckRegion(pq, r5);
|
getAndCheckRegion(pq, r5);
|
||||||
getAndCheckRegion(pq, r1);
|
getAndCheckRegion(pq, r1);
|
||||||
|
@ -147,11 +147,11 @@ public class TestPriorityCompactionQueue {
|
||||||
// test 4
|
// test 4
|
||||||
// check fifo w/mixed priority elevation time
|
// check fifo w/mixed priority elevation time
|
||||||
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r2, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r5, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
|
||||||
|
|
||||||
getAndCheckRegion(pq, r2);
|
getAndCheckRegion(pq, r2);
|
||||||
getAndCheckRegion(pq, r5);
|
getAndCheckRegion(pq, r5);
|
||||||
|
@ -170,7 +170,7 @@ public class TestPriorityCompactionQueue {
|
||||||
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r3, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
||||||
|
|
||||||
getAndCheckRegion(pq, r3);
|
getAndCheckRegion(pq, r3);
|
||||||
getAndCheckRegion(pq, r1);
|
getAndCheckRegion(pq, r1);
|
||||||
|
@ -205,7 +205,7 @@ public class TestPriorityCompactionQueue {
|
||||||
// we can handle negative priorities
|
// we can handle negative priorities
|
||||||
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
|
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r2, -1);
|
addRegion(pq, r2, -1);
|
||||||
addRegion(pq, r3, CompactSplitThread.PRIORITY_BLOCKING);
|
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
|
||||||
addRegion(pq, r4, -2);
|
addRegion(pq, r4, -2);
|
||||||
|
|
||||||
getAndCheckRegion(pq, r4);
|
getAndCheckRegion(pq, r4);
|
||||||
|
|
Loading…
Reference in New Issue