azkaban/azkaban — pull request #281 by hluu (2014-07-11 21:33:12+00:00)
Title: flowRunnerManager JMX bean : the NumExecutingFlows and RunningFlows values are not correct

This fix separates out the flows are the prepared state from the flows that are in the executing state.

There is a refactoring in FlowRunnerManager that removes the need for storing submitted flows in a queue because the thread pool already has a queue. Also the flows are now submitted directly to executor service instead of through a background thread, which simplifies the code a bit.

New JMX attributes:
* MaxQueuedFlows - maximum # of flows can be in the queue, which means waiting to be executed
* MaxNumRunningFlows - maximum # of flows that can be executed concurrently
* NumQueuedFlows - # of flows that are in the queue - prepared state
* QueuedFlows - the execution ids of the flows that are in the queue
* TotalNumExecutedFlows - total # of flows that had been executed since executor server started

Deleted JMX attributes:
* SubmitterThreadState
* LastSubmitterThreadCheckTime
* SubmitterThreadActive
The reason these JMX attributes are not needed anymore is because the submitter thread doesn't exist anymore.