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

Jing Zhao commented on HDFS-8823:
---------------------------------

The latest patch looks good to me. One comment is that for {{setReplication}}, 
instead of checking/updating quota block by block, we should calculate the 
total delta first and check if it breaks the quota limit.
{code}
    // Ensure the quota does not exceed
    if (oldBR < replication) {
      for (BlockInfo b : file.getBlocks()) {
        fsd.updateCount(iip, 0L, b.getNumBytes(), oldBR, replication,
                        true);
      }
    }
{code}

[~daryn], do you want to take a look at the patch?

> Move replication factor into individual blocks
> ----------------------------------------------
>
>                 Key: HDFS-8823
>                 URL: https://issues.apache.org/jira/browse/HDFS-8823
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-8823.000.patch, HDFS-8823.001.patch, 
> HDFS-8823.002.patch, HDFS-8823.003.patch, HDFS-8823.004.patch, 
> HDFS-8823.005.patch
>
>
> This jira proposes to record the replication factor in the {{BlockInfo}} 
> class. The changes have two advantages:
> * Decoupling the namespace and the block management layer. It is a 
> prerequisite step to move block management off the heap or to a separate 
> process.
> * Increased flexibility on replicating blocks. Currently the replication 
> factors of all blocks have to be the same. The replication factors of these 
> blocks are equal to the highest replication factor across all snapshots. The 
> changes will allow blocks in a file to have different replication factor, 
> potentially saving some space.



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

Reply via email to