[ https://issues.apache.org/jira/browse/STORM-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stig Rohde Døssing updated STORM-2874: -------------------------------------- Affects Version/s: (was: 2.0.0) 1.2.0 > Minor style improvements to backpressure code > --------------------------------------------- > > Key: STORM-2874 > URL: https://issues.apache.org/jira/browse/STORM-2874 > Project: Apache Storm > Issue Type: Task > Components: storm-client > Affects Versions: 1.2.0 > Reporter: Stig Rohde Døssing > Assignee: Stig Rohde Døssing > Priority: Trivial > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > The WorkerBackpressureThread takes a workerData parameter that is unused. It > was intended to be used to pass worker data to the > WorkerBackpressureCallback, but since the callback is declared in the Worker > scope, it already has access to this object. > The WorkerBackpressureThreadTest uses looped sleep-and-check on an AtomicLong > to verify that the callback is called after notifying the trigger. We should > use a countdown latch for this instead. > The WorkerBackpressureThreadTest extends TestCase, which is a bad idea > because it makes the JUnit 4 annotations non-functional. > The backpressure callback in Worker checks whether any of the executor > disruptor queues have their backpressure flags set, by using map-reduce. We > can just use anyMatch instead, it's simpler and will break once any true > value is hit. -- This message was sent by Atlassian JIRA (v6.4.14#64029)