Repository: flume Updated Branches: refs/heads/trunk 4d2a34e93 -> cfefda167
FLUME-2654. Clarify error message in MemoryChannel when byte capacity is reached. (Johny Rufus via Hari) Project: http://git-wip-us.apache.org/repos/asf/flume/repo Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/cfefda16 Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/cfefda16 Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/cfefda16 Branch: refs/heads/trunk Commit: cfefda167ea42aa5d68e15ac55bc2d6394c2d48d Parents: 4d2a34e Author: Hari Shreedharan <[email protected]> Authored: Tue Apr 7 13:18:32 2015 -0700 Committer: Hari Shreedharan <[email protected]> Committed: Tue Apr 7 13:18:32 2015 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/flume/channel/MemoryChannel.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/cfefda16/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java ---------------------------------------------------------------------- diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java b/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java index b84a3e0..6575d10 100644 --- a/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java +++ b/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java @@ -120,10 +120,10 @@ public class MemoryChannel extends BasicChannelSemantics { if(remainingChange < 0) { if(!bytesRemaining.tryAcquire(putByteCounter, keepAlive, TimeUnit.SECONDS)) { - throw new ChannelException("Cannot commit transaction. Heap space " + - "limit of " + byteCapacity + "reached. Please increase heap space" + - " allocated to the channel as the sinks may not be keeping up " + - "with the sources"); + throw new ChannelException("Cannot commit transaction. Byte capacity " + + "allocated to store event body " + byteCapacity * byteCapacitySlotSize + + "reached. Please increase heap space/byte capacity allocated to " + + "the channel as the sinks may not be keeping up with the sources"); } if(!queueRemaining.tryAcquire(-remainingChange, keepAlive, TimeUnit.SECONDS)) { bytesRemaining.release(putByteCounter);
