[
https://issues.apache.org/jira/browse/HDFS-5270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14551371#comment-14551371
]
zhangduo commented on HDFS-5270:
--------------------------------
I do not know what does 'puts thread back into the thread pool' mean...
The main point is we should not interrupt the thread and join on it because the
thread may have already begun to process other tasks. We need to call
future.cancel, and use the new runnable class introduced in this patch to wait
for the task done. And the new logic being added is also close the socket. This
is what I reported in the mailing list-interrupt can not stop a blocking socket
read nor a local disk write...
We can not bypass the above logic so I do not think replace Stopper with
DataXceiver could reduce the patch size a lot...
The white space changes can be removed. I did it because the QA bot reported a
-1...
Thanks for the review [~cmccabe] .
> Use thread pools in the datenode daemons
> ----------------------------------------
>
> Key: HDFS-5270
> URL: https://issues.apache.org/jira/browse/HDFS-5270
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: datanode
> Reporter: Haohui Mai
> Assignee: zhangduo
> Labels: BB2015-05-TBR
> Attachments: HDFS-5270.000.patch, HDFS-5270.2.patch,
> HDFS-5270.3.patch, HDFS-5270.4.patch, TestConcurrentAccess.java
>
>
> The current implementation of the datanode creates a thread when a new
> request comes in. This incurs high overheads for the creation / destruction
> of threads, making the datanode unstable under high concurrent loads.
> This JIRA proposes to use a thread pool to reduce the overheads.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)