You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flume.apache.org by br...@apache.org on 2012/09/24 23:04:14 UTC
git commit: FLUME-1603: FileChannel capacity reached message is
unclear
Updated Branches:
refs/heads/trunk e4950a6d4 -> ddb789a45
FLUME-1603: FileChannel capacity reached message is unclear
(Ted Malaska via Brock Noland)
Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/ddb789a4
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/ddb789a4
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/ddb789a4
Branch: refs/heads/trunk
Commit: ddb789a459b2143331acd2b89f4606af5312069d
Parents: e4950a6
Author: Brock Noland <br...@apache.org>
Authored: Mon Sep 24 16:03:01 2012 -0500
Committer: Brock Noland <br...@apache.org>
Committed: Mon Sep 24 16:03:01 2012 -0500
----------------------------------------------------------------------
.../org/apache/flume/channel/file/FileChannel.java | 5 ++++-
.../apache/flume/channel/file/TestFileChannel.java | 7 +++++--
.../org/apache/flume/channel/file/TestUtils.java | 13 ++++++++++---
3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flume/blob/ddb789a4/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
index 09a2a18..ca7db70 100644
--- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
+++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
@@ -387,7 +387,10 @@ public class FileChannel extends BasicChannelSemantics {
// this does not need to be in the critical section as it does not
// modify the structure of the log or queue.
if(!queueRemaining.tryAcquire(keepAlive, TimeUnit.SECONDS)) {
- throw new ChannelException("Cannot acquire capacity. "
+ throw new ChannelException("The channel has reached it's capacity. "
+ + "This might be the result of a sink on the channel having too "
+ + "low of batch size, a downstream system running slower than "
+ + "normal, or that the channel capacity is just too low. "
+ channelNameDescriptor);
}
boolean success = false;
http://git-wip-us.apache.org/repos/asf/flume/blob/ddb789a4/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannel.java b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannel.java
index c12e7d2..41b1fbb 100644
--- a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannel.java
+++ b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannel.java
@@ -171,8 +171,11 @@ public class TestFileChannel extends TestFileChannelBase {
in.addAll(putEvents(channel, "reconfig", 1, 1));
}
} catch (ChannelException e) {
- Assert.assertEquals("Cannot acquire capacity. [channel="
- +channel.getName()+"]", e.getMessage());
+ Assert.assertEquals("The channel has reached it's capacity. "
+ + "This might be the result of a sink on the channel having too "
+ + "low of batch size, a downstream system running slower than "
+ + "normal, or that the channel capacity is just too low. [channel="
+ + channel.getName()+"]", e.getMessage());
}
Configurables.configure(channel, createContext());
Set<String> out = takeEvents(channel, 1, Integer.MAX_VALUE);
http://git-wip-us.apache.org/repos/asf/flume/blob/ddb789a4/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java
index 8807201..9978f86 100644
--- a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java
+++ b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java
@@ -194,8 +194,11 @@ public class TestUtils {
result.addAll(batch);
}
} catch (ChannelException e) {
- Assert.assertEquals("Cannot acquire capacity. [channel="
- +channel.getName()+"]", e.getMessage());
+ Assert.assertEquals("The channel has reached it's capacity. This might "
+ + "be the result of a sink on the channel having too low of batch "
+ + "size, a downstream system running slower than normal, or that "
+ + "the channel capacity is just too low. [channel="
+ + channel.getName()+"]", e.getMessage());
}
}
return result;
@@ -224,7 +227,11 @@ public class TestUtils {
} catch (Exception ex) {
transaction.rollback();
if(untilCapacityIsReached && ex instanceof ChannelException &&
- ("Cannot acquire capacity. [channel=" +channel.getName() + "]").
+ ("The channel has reached it's capacity. "
+ + "This might be the result of a sink on the channel having too "
+ + "low of batch size, a downstream system running slower than "
+ + "normal, or that the channel capacity is just too low. "
+ + "[channel=" +channel.getName() + "]").
equals(ex.getMessage())) {
break;
}