Repository: kafka
Updated Branches:
  refs/heads/trunk 2965f50e0 -> 332b8b9af


KAFKA-4319; Parallelize shutdown of fetchers in AbstractFetcherManager to 
speedup shutdown

Author: Alexey Ozeritsky <aozerit...@yandex-team.ru>

Reviewers: Ismael Juma <ism...@juma.me.uk>, Jason Gustafson <ja...@confluent.io>

Closes #2023 from resetius/AbstractFetcherManager-shutdown-speedup


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/332b8b9a
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/332b8b9a
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/332b8b9a

Branch: refs/heads/trunk
Commit: 332b8b9afd04b975a42b91775edebdef5c27ff6b
Parents: 2965f50
Author: Alexey Ozeritsky <aozerit...@yandex-team.ru>
Authored: Wed Oct 19 09:43:03 2016 -0700
Committer: Jason Gustafson <ja...@confluent.io>
Committed: Wed Oct 19 09:43:03 2016 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/AbstractFetcherManager.scala | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/332b8b9a/core/src/main/scala/kafka/server/AbstractFetcherManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/AbstractFetcherManager.scala 
b/core/src/main/scala/kafka/server/AbstractFetcherManager.scala
index 8f6b84f..d87a8cf 100755
--- a/core/src/main/scala/kafka/server/AbstractFetcherManager.scala
+++ b/core/src/main/scala/kafka/server/AbstractFetcherManager.scala
@@ -119,6 +119,10 @@ abstract class AbstractFetcherManager(protected val name: 
String, clientId: Stri
   def closeAllFetchers() {
     mapLock synchronized {
       for ( (_, fetcher) <- fetcherThreadMap) {
+        fetcher.initiateShutdown()
+      }
+
+      for ( (_, fetcher) <- fetcherThreadMap) {
         fetcher.shutdown()
       }
       fetcherThreadMap.clear()

Reply via email to