Review Board 1.7.22


FLUME-1131: ChannelProcessor does not handle transactions appropriately

Review Request #4837 - Created April 22, 2012 and updated

Brock Noland
trunk
FLUME-1131
Reviewers
Flume
flume-git
ChannelProcessor did not handle transactions well, in some cases if anything but ChannelException was thrown, the close in the finally would throw an exception as rollback was not called. In other cases if a subclass of error was thrown the same would occurred. Additionally, if getTransaction threw an exception the null transaction value was not handled and an NPE would be thrown.
Tests added and tests pass.

Diff revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

1 2 3
1 2 3

  1. flume-ng-core/pom.xml: Loading...
  2. flume-ng-core/src/main/java/org/apache/flume/channel/ChannelProcessor.java: Loading...
  3. flume-ng-core/src/test/java/org/apache/flume/channel/TestChannelProcessor.java: Loading...
flume-ng-core/pom.xml
Revision b9f1e12 New Change
[20] 95 lines
[+20]
96
    <dependency>
96
    <dependency>
97
      <groupId>joda-time</groupId>
97
      <groupId>joda-time</groupId>
98
      <artifactId>joda-time</artifactId>
98
      <artifactId>joda-time</artifactId>
99
    </dependency>
99
    </dependency>
100

    
   
100

   

    
   
101
      <dependency>

    
   
102
        <groupId>org.mockito</groupId>

    
   
103
        <artifactId>mockito-all</artifactId>

    
   
104
        <version>1.9.0</version>

    
   
105
        <scope>test</scope>

    
   
106
      </dependency>

    
   
107

   
101
  </dependencies>
108
  </dependencies>
102

    
   
109

   
103
</project>
110
</project>
flume-ng-core/src/main/java/org/apache/flume/channel/ChannelProcessor.java
Revision eb6460e New Change
 
flume-ng-core/src/test/java/org/apache/flume/channel/TestChannelProcessor.java
New File
 
  1. flume-ng-core/pom.xml: Loading...
  2. flume-ng-core/src/main/java/org/apache/flume/channel/ChannelProcessor.java: Loading...
  3. flume-ng-core/src/test/java/org/apache/flume/channel/TestChannelProcessor.java: Loading...