You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Ayush Saxena (Jira)" <ji...@apache.org> on 2023/07/14 06:28:00 UTC

[jira] [Resolved] (HDFS-17081) EC: Add logic for striped blocks in isSufficientlyReplicated

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

Ayush Saxena resolved HDFS-17081.
---------------------------------
    Fix Version/s: 3.4.0
     Hadoop Flags: Reviewed
       Resolution: Fixed

> EC: Add logic for striped blocks in isSufficientlyReplicated
> ------------------------------------------------------------
>
>                 Key: HDFS-17081
>                 URL: https://issues.apache.org/jira/browse/HDFS-17081
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Haiyang Hu
>            Assignee: Haiyang Hu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>
> Append ec file check if a block is replicated to at least the minimum replication need consider ec block.
> currently only the minimum replication of the replica is considered, the code is as follows:
> {code:java}
> /**
>    * Check if a block is replicated to at least the minimum replication.
>    */
>   public boolean isSufficientlyReplicated(BlockInfo b) {
>     // Compare against the lesser of the minReplication and number of live DNs.
>     final int liveReplicas = countNodes(b).liveReplicas();
>     if (liveReplicas >= minReplication) {
>       return true;
>     }
>     // getNumLiveDataNodes() is very expensive and we minimize its use by
>     // comparing with minReplication first.
>     return liveReplicas >= getDatanodeManager().getNumLiveDataNodes();
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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