hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Zheng (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-9734) Refactoring of checksum failure report related codes
Date Tue, 16 Feb 2016 03:42:18 GMT

     [ https://issues.apache.org/jira/browse/HDFS-9734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kai Zheng updated HDFS-9734:
----------------------------
    Attachment: HDFS-9734-v6.patch

Fixed one minor check style.

> Refactoring of checksum failure report related codes
> ----------------------------------------------------
>
>                 Key: HDFS-9734
>                 URL: https://issues.apache.org/jira/browse/HDFS-9734
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Kai Zheng
>            Assignee: Kai Zheng
>         Attachments: HADOOP-12744-v1.patch, HADOOP-12744-v2.patch, HDFS-9734-v3.patch,
HDFS-9734-v4.patch, HDFS-9734-v5.patch, HDFS-9734-v6.patch
>
>
> This was from discussion with [~jingzhao] in HDFS-9646. There is some duplicate codes
between client and datanode sides:
> {code}
>     private void addCorruptedBlock(ExtendedBlock blk, DatanodeInfo node,
>         Map<ExtendedBlock, Set<DatanodeInfo>> corruptionMap) {
>       Set<DatanodeInfo> dnSet = corruptionMap.get(blk);
>       if (dnSet == null) {
>         dnSet = new HashSet<>();
>         corruptionMap.put(blk, dnSet);
>       }
>       if (!dnSet.contains(node)) {
>         dnSet.add(node);
>       }
>     }
> {code}
> This would resolve the duplication and also simplify the codes some bit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message