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:
Michael Stack 2010-10-29 06:20:52 +00:00
parent 7b4eb5b505
commit 73727e534a
1 changed files with 13 additions and 13 deletions

View File

@ -104,11 +104,11 @@ public class TestPriorityCompactionQueue {
// test 1
// check fifo w/priority
addRegion(pq, r1, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r2, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r3, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r4, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r5, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
getAndCheckRegion(pq, r1);
getAndCheckRegion(pq, r2);
@ -118,11 +118,11 @@ public class TestPriorityCompactionQueue {
// test 2
// 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, r3, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r3, 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, r3);
@ -136,7 +136,7 @@ public class TestPriorityCompactionQueue {
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r3, 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, r1);
@ -147,11 +147,11 @@ public class TestPriorityCompactionQueue {
// test 4
// check fifo w/mixed priority elevation time
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r2, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r2, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
Thread.sleep(1000);
addRegion(pq, r4, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r5, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r5, CompactSplitThread.PRIORITY_USER);
getAndCheckRegion(pq, r2);
getAndCheckRegion(pq, r5);
@ -170,7 +170,7 @@ public class TestPriorityCompactionQueue {
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r4, 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, r1);
@ -205,7 +205,7 @@ public class TestPriorityCompactionQueue {
// we can handle negative priorities
addRegion(pq, r1, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r2, -1);
addRegion(pq, r3, CompactSplitThread.PRIORITY_BLOCKING);
addRegion(pq, r3, CompactSplitThread.PRIORITY_USER);
addRegion(pq, r4, -2);
getAndCheckRegion(pq, r4);