[ 
https://issues.apache.org/jira/browse/KAFKA-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435249#comment-13435249
 ] 

Jay Kreps commented on KAFKA-356:
---------------------------------

1. Can we make name a required parameter? No one ever thinks to name the 
threads until we are trying to debug some prod issue and then we can't figure 
out what is what easily.
2. What is logIdent do?
3. Can you add full scaladoc to the KafkaThread class that describes what it is 
for and how to use it?
4. What is the logging class that gets used for things this class logs out? It 
is important that it not log them under KafkaThread but rather under whatever 
the extending class is, otherwise it will not be informative.
5. Your log messages need some work. Please make them complete sentences, fix 
the spelling errors, and make them something that would be understandable in a 
busy log with lots of messages in it. For example if I see a message "stopped" 
mixed in with many other messages, what should I interpret that to mean? There 
is a guide to the logging levels in the coding style guide. Can you make sure 
the resulting logging after this conversion makes sense and everything is 
logged at the right level?
6. Can we change the name to BackgroundThread or WorkerThread or something 
since not all Kafka threads extend this?
7. Agree with Jun that we need a better name then fun. Maybe "process()"?
                
> 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
>              Labels: optimization
>         Attachments: kafka_356_v1.diff, kafka_356_v2.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

        

Reply via email to