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

Weiwei Yang commented on HDFS-11846:
------------------------------------

This patch includes following fixes

# Fixed http connection leaks in {{OzoneVolume}}, {{OzoneBuckets}} and 
{{OzoneClient}}, ensures to cleanup both http client and http requests properly.
# Added a test case in {{TestVolume#testCreateVolume}} to verify connections 
are properly closed. Note, this patch doesn't cover all places that have leaks, 
but it is easy to replica this case to other places if necessary. As the code 
path is really similar, we might want to add one case for each class.
# This patch still creates a new HttpClient each time when talking to ozone 
server, because I found there are some problems in netty server side 
{{RequestDispatchObjectStoreChannelHandler}} and 
{{RequestContentObjectStoreChannelHandler}}, it cannot handle multiple requests 
from same http client. I don't know how to fix that yet, may need another jira 
for that.

> Ozone: Potential http connection leaks in ozone clients
> -------------------------------------------------------
>
>                 Key: HDFS-11846
>                 URL: https://issues.apache.org/jira/browse/HDFS-11846
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>         Attachments: HDFS-11846-HDFS-7240.001.patch
>
>
> There are several problems
> # Http clients in {{OzoneVolume}}, {{OzoneBucket}} and {{OzoneClient}} are 
> created per request, per [Reuse of HttpClient 
> instance|http://hc.apache.org/httpclient-3.x/performance.html#Reuse_of_HttpClient_instance]
>  doc, proposed to reuse the http client instance to reduce the over head.
> # Some resources in these classes were not properly cleaned up. E.g the http 
> connection, HttpGet/HttpPost requests.
>  
> This jira's purpose is to fix these issues and investigate how we can improve 
> the client.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to