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

Konstantin Shvachko commented on HDFS-7057:
-------------------------------------------

Looks so much better. Few more comments:
- In RawLocalFileSystem impl you probably want to check if the file exists and 
if it is not a directory, even if only to throw the right exceptions. We should 
also check that newLength is not greater that the current file length.
- In JavaDoc for FileSystem.truncate() we should borrow some text from 
ClientProtocol.truncate() to explain the truncate contract better. In 
particular that truncate is not to be used to increase file size as per the 
design doc.
For the return value I suggest that we use a more generic phrasing from the 
Synopsys section of the design doc.

Looking that all the changes are in common it seems better to convert this jira 
to a HADOOP issue rather than HDFS. But let's wait for Jenkins first.

> Expose truncate API via FileSystem and shell command
> ----------------------------------------------------
>
>                 Key: HDFS-7057
>                 URL: https://issues.apache.org/jira/browse/HDFS-7057
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>    Affects Versions: 3.0.0
>            Reporter: Konstantin Shvachko
>            Assignee: Milan Desai
>         Attachments: HDFS-7057-2.patch, HDFS-7057.patch
>
>
> Add truncate operation to FileSystem and expose it to users via shell command.



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

Reply via email to