GitHub user hangc0276 opened a pull request: https://github.com/apache/flume/pull/104
fix "eventCounter" increase bug in append() In append() function, when the "batchCounter" is equal to batchSize, flush() will be called, which may throw exceptions when the network jitter happens on HDFS. Once exception happens, the event appended to the batch will be rollback, but the "eventCounter" has already been increased, which will make the "eventCounter" wrong value. So, the "eventCounter" should be increased after flush() happens. You can merge this pull request into a Git repository by running: $ git pull https://github.com/hangc0276/flume trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flume/pull/104.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #104 ---- commit 1d321fddb1e52bb9986e14d440cca99ec2ab603f Author: hangc0276 <hangc0...@163.com> Date: 2017-01-11T09:25:41Z fix "eventCounter" increase bug in append() In append() function, when the "batchCounter" is equal to batchSize, flush() will be called, which may throw exceptions when the network jitter happens on HDFS. Once exception happens, the event appended to the batch will be rollback, but the "eventCounter" has already been increased, which will make the "eventCounter" wrong value. So, the "eventCounter" should be increased after flush() happens. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---