haiyang1987 opened a new pull request, #5833:
URL: https://github.com/apache/hadoop/pull/5833

   ### Description of PR
   
   https://issues.apache.org/jira/browse/HDFS-17081
   
   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:
   
   /**
   ```
      * 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();
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to