Stig Rohde Døssing created STORM-2874:
-----------------------------------------

             Summary: 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: 2.0.0
            Reporter: Stig Rohde Døssing
            Assignee: Stig Rohde Døssing
            Priority: Trivial


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)

Reply via email to