[
https://issues.apache.org/jira/browse/HDFS-4507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589048#comment-13589048
]
Jing Zhao commented on HDFS-4507:
---------------------------------
The patch looks good to me.
1. In INodeFile.java
{noformat}
+ /** Set the replication factor of this file. */
+ public void setFileReplication(short replication, Snapshot latest)
+ throws NSQuotaExceededException {
final INodeFile nodeToUpdate = recordModification(latest);
- if (nodeToUpdate != this) {
- nodeToUpdate.setFileReplication(replication, null);
- return;
- }
+ nodeToUpdate.setFileReplication(replication);
header = HeaderFormat.combineReplication(header, replication);
}
{noformat}
The line "header = HeaderFormat.combineReplication(header, replication);" can
be removed since we already update the replication factor for nodeToUpdate.
2. In INodeDirectory#addChild(INode, int),
{noformat}
+ // update modification time of the parent directory
+ if (node.getGroupName() == null) {
+ node.setGroup(getGroupName());
+ }
{noformat}
The comment is not consistent with the code.
+1 after these two being addressed.
> Update quota verification for snapshot
> --------------------------------------
>
> Key: HDFS-4507
> URL: https://issues.apache.org/jira/browse/HDFS-4507
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Tsz Wo (Nicholas), SZE
> Attachments: h4507_20130223.patch, h4507_20130226.patch,
> h4507_20130227.patch
>
>
> With snapshots, the file diff and directory diff objects also occupy
> namespace. The quota verification logic needs to be updated.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira