hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weiwei Yang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11783) Ozone: Fix spotbugs warnings
Date Wed, 10 May 2017 03:24:04 GMT

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

Weiwei Yang commented on HDFS-11783:
------------------------------------

Uploaded v2 patch to fix the findbugs warning in {{VolumeDescriptor}}, it was using keyset
iterator which has performance issue. Looking at that code, the loop of {{containerMap}} was
to compare two maps, in this case, we don't need the loop at all, simply by calling {{containerMap.equals(other.containerMap)}}
should work. According to java doc for {{AbstractMap#equals()}}

{noformat}
Compares the specified object with this map for equality. 
Returns true if the given object is also a map and the two maps represent the same mappings.
{noformat}

[~linyiqun] and [~anu], please kindly review.

> Ozone: Fix spotbugs warnings
> ----------------------------
>
>                 Key: HDFS-11783
>                 URL: https://issues.apache.org/jira/browse/HDFS-11783
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>              Labels: findbugs
>         Attachments: HDFS-11783-HDFS-7240.001.patch, HDFS-11783-HDFS-7240.002.patch
>
>
> Trunk moves to spotbugs, there might be new warnings in ozone project. This task is to
track these issues and fix spotbugs warnings. This task is aimed to fix the warnings for ozone
classes, there is a separate one for rest of hdfs in HDFS-11696.



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

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


Mime
View raw message