GitHub user Guangxian opened a pull request:
https://github.com/apache/flume/pull/192
FLUME-3205:Remove unnecessary 'synchronized' in ResettableFileInputStream
I found no concurrent access to ResettableFileInputStream object in flume
code.
Remove 'synchronized' will improve performance of SpoolDirectorySource.
Tested with a file of 200MBï¼with 'synchronized' it took 9 seconds to read
the file.
Without 'synchronized' it took 7 seconds.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Guangxian/flume flume-3205
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flume/pull/192.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 #192
----
commit cdb6deaf7a6ee69d64d590295d44acc62834cdcc
Author: liaoguangxian <liaoguangxian@...>
Date: 2017-12-26T15:05:35Z
Remove unnecessary 'synchronized' in ResettableFileInputStream
----
---