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

Vinayakumar B commented on HDFS-11291:
--------------------------------------

for setReplication() following check can be added directly inside 
unprotectedSetReplication() and avoid other changes related to this.
{code} if (inode.asFile().getPreferredBlockReplication() == replication) {
    return null;
}{code}

Can fix whitespaces also together

+1 once addressed,

> Avoid unnecessary edit log for setStoragePolicy() and setReplication()
> ----------------------------------------------------------------------
>
>                 Key: HDFS-11291
>                 URL: https://issues.apache.org/jira/browse/HDFS-11291
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Surendra Singh Lilhore
>            Assignee: Surendra Singh Lilhore
>         Attachments: HDFS-11291.001.patch, HDFS-11291.002.patch
>
>
> We are setting the storage policy for file without checking the current 
> policy of file for avoiding extra getStoragePolicy() rpc call. Currently 
> namenode is not checking the current storage policy before setting new one 
> and adding edit logs. I think if the old and new storage policy is same we 
> can avoid set operation.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to