[
https://issues.apache.org/jira/browse/HDFS-7677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293092#comment-14293092
]
Konstantin Shvachko commented on HDFS-7677:
-------------------------------------------
Looks good. Few minor nits on the test:
# Could you move {{testTruncate4Symlink()}} just before {{writeContents()}}. It
is positioned now between two {{testSnapshotWithAppendTruncate()}} mehods,
which should logically be together.
# Looks like you truncate on the block boundary, so
{{if(!isReady) { ...}}
can be replaced with
{{assertTrue("Recovery is not expected.", isReady);}}
# Replacing {{AppendTestUtil.checkFullFile()}} with {{checkFullFile()}} would
save a few bytes of code.
> DistributedFileSystem#truncate should resolve symlinks
> ------------------------------------------------------
>
> Key: HDFS-7677
> URL: https://issues.apache.org/jira/browse/HDFS-7677
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode, namenode
> Reporter: Yi Liu
> Assignee: Yi Liu
> Attachments: HDFS-7677.001.patch
>
>
> We should resolve the symlinks in DistributedFileSystem#truncate as we do for
> {{create}}, {{open}}, {{append}} and so on, I don't see any reason not
> support it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)