Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/2502#discussion_r167286681 --- Diff: storm-client/src/jvm/org/apache/storm/Config.java --- @@ -890,30 +871,91 @@ public static final String TOPOLOGY_ISOLATED_MACHINES = "topology.isolate.machines"; /** - * Configure timeout milliseconds used for disruptor queue wait strategy. Can be used to tradeoff latency - * vs. CPU usage + * Selects the Bolt's Wait Strategy to use when there are no incoming msgs. Used to trade off latency vs CPU usage. + */ + @isString + public static final String TOPOLOGY_BOLT_WAIT_STRATEGY = "topology.bolt.wait.strategy"; + + /** + * Configures park time for WaitStrategyPark. If set to 0, returns immediately (i.e busy wait). */ - @isInteger @NotNull - public static final String TOPOLOGY_DISRUPTOR_WAIT_TIMEOUT_MILLIS="topology.disruptor.wait.timeout.millis"; + @isPositiveNumber(includeZero = true) + public static final String TOPOLOGY_BOLT_WAIT_PARK_MICROSEC = "topology.bolt.wait.park.microsec"; /** - * The number of tuples to batch before sending to the next thread. This number is just an initial suggestion and - * the code may adjust it as your topology runs. + * Configures number of iterations to spend in level 1 of WaitStrategyProgressive, before progressing to level 2 */ + @NotNull @isInteger @isPositiveNumber + public static final String TOPOLOGY_BOLT_WAIT_PROGRESSIVE_LEVEL1_COUNT = "topology.bolt.wait.progressive.level1.count"; + + /** + * Configures number of iterations to spend in level 2 of WaitStrategyProgressive, before progressing to level 3 + */ @NotNull - public static final String TOPOLOGY_DISRUPTOR_BATCH_SIZE="topology.disruptor.batch.size"; + @isInteger + @isPositiveNumber + public static final String TOPOLOGY_BOLT_WAIT_PROGRESSIVE_LEVEL2_COUNT = "topology.bolt.wait.progressive.level2.count"; /** - * The maximum age in milliseconds a batch can be before being sent to the next thread. This number is just an - * initial suggestion and the code may adjust it as your topology runs. + * Configures sleep time for WaitStrategyProgressive. */ + @NotNull + @isPositiveNumber(includeZero = true) + public static final String TOPOLOGY_BOLT_WAIT_PROGRESSIVE_LEVEL3_SLEEP_MILLIS = "topology.bolt.wait.progressive.level3.sleep.millis"; + + + /** + * A class that implements a wait strategy for an upstream component (spout/bolt) trying to write to a downstream component + * whose recv queue is full + * + * 1. nextTuple emits no tuples + * 2. The spout has hit maxSpoutPending and can't emit any more tuples + */ + @isString + public static final String TOPOLOGY_BACKPRESSURE_WAIT_STRATEGY="topology.backpressure.wait.strategy"; --- End diff -- Here too if this is a class name it would be good to verify that it is an instance of a given class early on.
---