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

Weiwei Yang commented on HDFS-11824:
------------------------------------

Hi [~linyiqun]

The change looks good to me, I have tried and verified the javac warnings are 
fixed. Just one minor comment, can we use {{HttpClients#createDefault()}} 
instead of {{HttpClientBuilder.create().build()}}? The former one seems a 
better API to call as there is no need to add customized properties to add. If 
we need to set more properties, we can call {{HttpClients#custom()}} and this 
will return the builder. 

Second while reviewing this patch, I found the http clients in {{OzoneVolume}}, 
{{OzoneBucket}} and {{OzoneClient}} are not closed which could lead to resource 
leak, we need to get this fixed in another jira, just filed HDFS-11846.

Thank you.

> Ozone: Fix javac warnings
> -------------------------
>
>                 Key: HDFS-11824
>                 URL: https://issues.apache.org/jira/browse/HDFS-11824
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-11824-HDFS-7240.001.patch, 
> HDFS-11824-HDFS-7240.002.patch, HDFS-11824-HDFS-7240.003.patch
>
>
> Found many javac warnings generated from ozone sources codes. Totally two 
> types warnings:
> {noformat}
> [WARNING] 
> /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/web/client/OzoneBucket.java:[482,41]
>  [deprecation] DefaultHttpClient in org.apache.http.impl.client has been 
> deprecated
> [WARNING] 
> /testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneClientUtils.java:[284,52]
>  [deprecation] getHostText() in HostAndPort has been deprecated
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to