GitHub user uncleGen opened a pull request: https://github.com/apache/spark/pull/16601
[SPARK-19182][DStream] Optimize the lock in StreamingJobProgressListener to not block UI when generating Streaming jobs ## What changes were proposed in this pull request? When DStreamGraph is generating a job, it will hold a lock and block other APIs. Because StreamingJobProgressListener (numInactiveReceivers, streamName(streamId: Int), streamIds) needs to call DStreamGraph's methods to access some information, the UI may hang if generating a job is very slow (e.g., talking to the slow Kafka cluster to fetch metadata). It's better to optimize the locks in DStreamGraph and StreamingJobProgressListener to make the UI not block by job generation. ## How was this patch tested? existing ut cc @zsxwing You can merge this pull request into a Git repository by running: $ git pull https://github.com/uncleGen/spark SPARK-19182 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16601.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16601 ---- commit 46036bf683632e03f970de20f7bcd17b5369d5dc Author: uncleGen <husty...@gmail.com> Date: 2017-01-16T09:14:32Z Optimize the lock in StreamingJobProgressListener to not block UI when generating Streaming jobs ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org