Review Board 1.7.22


FileChannel capacity reached message is unclear

Review Request #7228 - Created Sept. 24, 2012 and submitted

Ted Malaska
trunk
FLUME-1603
Reviewers
Flume
flume-git
Updated old exception message to match that of Brock Noland.

 
flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
Revision 09a2a18 New Change
[20] 384 lines
[+20] [+] protected void doPut(Event event) throws InterruptedException {
385
            "increasing thread count. " + channelNameDescriptor);
385
            "increasing thread count. " + channelNameDescriptor);
386
      }
386
      }
387
      // this does not need to be in the critical section as it does not
387
      // this does not need to be in the critical section as it does not
388
      // modify the structure of the log or queue.
388
      // modify the structure of the log or queue.
389
      if(!queueRemaining.tryAcquire(keepAlive, TimeUnit.SECONDS)) {
389
      if(!queueRemaining.tryAcquire(keepAlive, TimeUnit.SECONDS)) {
390
        throw new ChannelException("Cannot acquire capacity. "
390
        throw new ChannelException("The channel has reached it's capacity. " 

    
   
391
            + "This might be the result of a sink on the channel having too "

    
   
392
            + "low of batch size, a downstream system running slower than "

    
   
393
            + "normal, or that the channel capacity is just too low. "
391
            + channelNameDescriptor);
394
            + channelNameDescriptor);
392
      }
395
      }
393
      boolean success = false;
396
      boolean success = false;
394
      boolean lockAcquired = log.tryLockShared();
397
      boolean lockAcquired = log.tryLockShared();
395
      try {
398
      try {
[+20] [20] 161 lines
flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannel.java
Revision c12e7d2 New Change
 
flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java
Revision 8807201 New Change
 
  1. flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java: Loading...
  2. flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannel.java: Loading...
  3. flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java: Loading...