Return-Path: X-Original-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-kafka-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A13E09572 for ; Thu, 9 Aug 2012 18:57:19 +0000 (UTC) Received: (qmail 93920 invoked by uid 500); 9 Aug 2012 18:57:19 -0000 Delivered-To: apmail-incubator-kafka-dev-archive@incubator.apache.org Received: (qmail 93894 invoked by uid 500); 9 Aug 2012 18:57:19 -0000 Mailing-List: contact kafka-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kafka-dev@incubator.apache.org Delivered-To: mailing list kafka-dev@incubator.apache.org Received: (qmail 93885 invoked by uid 99); 9 Aug 2012 18:57:19 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2012 18:57:19 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 2ECC0142818 for ; Thu, 9 Aug 2012 18:57:19 +0000 (UTC) Date: Thu, 9 Aug 2012 18:57:19 +0000 (UTC) From: "Yang Ye (JIRA)" To: kafka-dev@incubator.apache.org Message-ID: <1999374919.3123.1344538639193.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1895290545.24811.1338514162900.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (KAFKA-356) Create a generic Kafka thread class that includes basic boiler plate code of instantiating and shutting down threads cleanly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yang Ye updated KAFKA-356: -------------------------- Attachment: kafka_356_v1.diff Build a KafkaThread class which wraps shutting down with interruption and exception handling; and let the leaderFinderThread, AbstractFetcherThread and RequestSendThread classes extend it. > Create a generic Kafka thread class that includes basic boiler plate code of instantiating and shutting down threads cleanly > ---------------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-356 > URL: https://issues.apache.org/jira/browse/KAFKA-356 > Project: Kafka > Issue Type: Sub-task > Affects Versions: 0.8 > Reporter: Neha Narkhede > Assignee: Yang Ye > Attachments: kafka_356_v1.diff > > > We have a lot of threads that basically run in a loop and use an isRunning atomic boolean and count down latch. It will be useful to refactor it out into a helper runnable that these can extend. Verifying the lifecycle details for each is kind of a pain and it pretty easy to either not cleanly shutdown all the threads. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira