flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject git commit: FLUME-1603: FileChannel capacity reached message is unclear
Date Mon, 24 Sep 2012 21:04:23 GMT
Updated Branches:
  refs/heads/flume-1.3.0 e25d6d8b5 -> 3f49bef22


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/3f49bef2
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/3f49bef2
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/3f49bef2

Branch: refs/heads/flume-1.3.0
Commit: 3f49bef221cc74ae237d6f9c1ea153bc6f671a4b
Parents: e25d6d8
Author: Brock Noland <brock@apache.org>
Authored: Mon Sep 24 16:03:01 2012 -0500
Committer: Brock Noland <brock@apache.org>
Committed: Mon Sep 24 16:03:25 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/3f49bef2/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/3f49bef2/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/3f49bef2/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;
         }


Mime
View raw message