Repository: flume Updated Branches: refs/heads/trunk d1227feb6 -> 1003d1f41
FLUME-2558. Update javadoc for StressSource (Ashish Paliwal via Roshan Naik) Project: http://git-wip-us.apache.org/repos/asf/flume/repo Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/1003d1f4 Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/1003d1f4 Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/1003d1f4 Branch: refs/heads/trunk Commit: 1003d1f410bd5f9e94ebafe6df641d8ab3e90d3e Parents: d1227fe Author: Roshan Naik <[email protected]> Authored: Tue Nov 25 21:00:11 2014 -0800 Committer: Roshan Naik <[email protected]> Committed: Tue Nov 25 21:04:15 2014 -0800 ---------------------------------------------------------------------- .../org/apache/flume/source/StressSource.java | 25 +++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/1003d1f4/flume-ng-core/src/main/java/org/apache/flume/source/StressSource.java ---------------------------------------------------------------------- diff --git a/flume-ng-core/src/main/java/org/apache/flume/source/StressSource.java b/flume-ng-core/src/main/java/org/apache/flume/source/StressSource.java index 562b983..0e7020b 100644 --- a/flume-ng-core/src/main/java/org/apache/flume/source/StressSource.java +++ b/flume-ng-core/src/main/java/org/apache/flume/source/StressSource.java @@ -35,7 +35,21 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Internal load-generating source implementation. Useful for tests. + * StressSource is an internal load-generating source implementation + * which is very useful for stress tests. It allows User to configure + * the size of Event payload, with empty headers. User can configure + * total number of events to be sent as well maximum number of Successful + * Events to be delivered. Useful for tests + * + * Example configuration for Agent a1 + * <PRE> + * a1.sources = stresssource-1 + * a1.channels = memoryChannel-1 + * a1.sources.stresssource-1.type = org.apache.flume.source.StressSource + * a1.sources.stresssource-1.size = 10240 + * a1.sources.stresssource-1.maxTotalEvents = 1000000 + * a1.sources.stresssource-1.channels = memoryChannel-1 + * </PRE> * * See {@link StressSource#configure(Context)} for configuration options. */ @@ -57,15 +71,14 @@ public class StressSource extends AbstractSource implements public StressSource() { counterGroup = new CounterGroup(); - } /** * Read parameters from context - * <li>-maxTotalEvents = type long that defines the total number of events to be sent - * <li>-maxSuccessfulEvents = type long that defines the total number of events to be sent - * <li>-size = type int that defines the number of bytes in each event - * <li>-batchSize = type int that defines the number of events being sent in one batch + * <li>-maxTotalEvents = type long that defines the total number of Events to be sent + * <li>-maxSuccessfulEvents = type long that defines the number of successful Events + * <li>-size = type int that defines the number of bytes in each Event + * <li>-batchSize = type int that defines the number of Events being sent in one batch */ @Override public void configure(Context context) {
