GitHub user mpercy opened a pull request:
https://github.com/apache/flume/pull/72
Fix startup order for ExecSource
This patch starts the SourceCounter in the ExecSource before starting
the runner thread that processes input from the forked command.
Starting the SourceCounter before calling its methods is required to get
correct metric counts because the metrics are all reset to 0 when
SourceCounter.start() is called.
A follow-up patch will attempt to enforce that a SourceCounter or any
other MonitoredCounterGroup is running at the time that calls to modify
the metrics occur.
After applying this patch, TestExecSource.testMonitoredCounterGroup no
longer fails.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mpercy/flume flaky-exec-source-test-2a
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flume/pull/72.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 #72
----
commit b385dc76090287ce2a91d2982e8df77d64438d05
Author: Mike Percy <[email protected]>
Date: 2016-10-13T23:24:37Z
Fix startup order for ExecSource
This patch starts the SourceCounter in the ExecSource before starting
the runner thread that processes input from the forked command.
Starting the SourceCounter before calling its methods is required to get
correct metric counts because the metrics are all reset to 0 when
SourceCounter.start() is called.
A follow-up patch will attempt to enforce that a SourceCounter or any
other MonitoredCounterGroup is running at the time that calls to modify
the metrics occur.
After applying this patch, TestExecSource.testMonitoredCounterGroup no
longer fails.
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---