[ 
https://issues.apache.org/jira/browse/FLUME-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252128#comment-13252128
 ] 

[email protected] commented on FLUME-1113:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4704/#review6865
-----------------------------------------------------------

Ship it!


lgtm.



/trunk/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/impl/JdbcChannelProviderImpl.java
<https://reviews.apache.org/r/4704/#comment15289>

    should be currentSizeLong



/trunk/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/impl/JdbcTransactionImpl.java
<https://reviews.apache.org/r/4704/#comment15290>

    Do we need to reset these new counters in close() ?


- Prasad


On 2012-04-12 01:13:25, Arvind Prabhakar wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4704/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-12 01:13:25)
bq.  
bq.  
bq.  Review request for Flume.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  This change modifies the JDBC channel provider implementation so that it 
invokes the size query only during configuration to initialize it's own 
execution state. At runtime, the transaction instances keep track of how many 
events get added and removed and the delta is then added to the size maintained 
by the provider. Some notes about this implementation:
bq.  
bq.  * It is possible that between the commit and update of the size counter by 
one transaction, another transaction may read stale size information. 
bq.  * The size counter is only used to gate put operations and not take. This 
ensures that stale or incorrect information does not inhibit the draining of 
the channel.
bq.  
bq.  Also refactored the channel tests to be run with and without foreign keys 
enabled.
bq.  
bq.  
bq.  This addresses bug FLUME-1113.
bq.      https://issues.apache.org/jira/browse/FLUME-1113
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
/trunk/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/impl/JdbcChannelProviderImpl.java
 1325037 
bq.    
/trunk/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/impl/JdbcTransactionFactory.java
 1325037 
bq.    
/trunk/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/impl/JdbcTransactionImpl.java
 1325037 
bq.    
/trunk/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/BaseJdbcChannelProviderTest.java
 PRE-CREATION 
bq.    
/trunk/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestJdbcChannelProvider.java
 1325037 
bq.    
/trunk/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestJdbcChannelProviderNoFK.java
 PRE-CREATION 
bq.    
/trunk/flume-ng-core/src/main/java/org/apache/flume/source/AvroSource.java 
1325037 
bq.  
bq.  Diff: https://reviews.apache.org/r/4704/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Full build and tests.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Arvind
bq.  
bq.


                
> JDBC Channel invokes size query on every put
> --------------------------------------------
>
>                 Key: FLUME-1113
>                 URL: https://issues.apache.org/jira/browse/FLUME-1113
>             Project: Flume
>          Issue Type: Sub-task
>          Components: Channel
>            Reporter: Arvind Prabhakar
>            Assignee: Arvind Prabhakar
>             Fix For: v1.2.0
>
>         Attachments: FLUME-1113-1.patch, FLUME-1113-2.patch
>
>
> JDBC Channel provider invokes SchemaHandler.getChannelSize() to test for 
> capacity. It will be better if the channel issues this query once and then 
> uses an in-memory counter to maintain this rather than doing a query on every 
> put.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to