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

Hudson commented on HDFS-7638:
------------------------------

FAILURE: Integrated in Hadoop-Yarn-trunk #813 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/813/])
HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 
5a6c084f074990a1f412475b147fd4f040b57d57)
* 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt


> Small fix and few refinements for FSN#truncate
> ----------------------------------------------
>
>                 Key: HDFS-7638
>                 URL: https://issues.apache.org/jira/browse/HDFS-7638
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>             Fix For: 3.0.0
>
>         Attachments: HDFS-7638.001.patch
>
>
> *1.* 
> {code}
> removeBlocks(collectedBlocks);
> {code}
> should be after {{logSync}}, as we do in other FSN places (rename, delete, 
> write with overwrite), the reason is discussed in HDFS-2815 and 
> https://issues.apache.org/jira/browse/HDFS-6871?focusedCommentId=14110068&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14110068
> *2.*
> {code}
> stat = FSDirStatAndListingOp.getFileInfo(dir, src, false,
>     FSDirectory.isReservedRawName(src), true);
> {code}
> We'd better to use {{dir.getAuditFileInfo}}, since it's only for audit log. 
> If audit log is not on, we don't need to get the file info.
> *3.*
> In {{truncateInternal}}, 
> {code}
> INodeFile file = iip.getLastINode().asFile();
> {code}
> is not necessary. 



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

Reply via email to