Skip to content

Commit

Permalink
FLUME-2844. SpillableMemoryChannel must start ChannelCounter
Browse files Browse the repository at this point in the history
Reviewed by Bessenyei Balázs Donát

(Denes Arvay via Mike Percy)
  • Loading branch information
adenes authored and mpercy committed Aug 17, 2016
1 parent b6dede8 commit 118d5a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,7 @@ public synchronized void start() {
drainOrder.putOverflow(overFlowCount);
totalStored.release(overFlowCount);
}
channelCounter.start();
int totalCount = overFlowCount + memQueue.size();
channelCounter.setChannelCapacity(memoryCapacity + getOverflowCapacity());
channelCounter.setChannelSize(totalCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,9 @@ public void testCounters() throws InterruptedException {
params.put("overflowTimeout", "0");
startChannel(params);

Assert.assertTrue("channel.channelCounter should have started",
channel.channelCounter.getStartTime() > 0);

//1. fill up mem queue
Thread sourceThd = makePutThread("src", 1, 5000, 2500, channel);
sourceThd.start();
Expand Down

0 comments on commit 118d5a4

Please sign in to comment.