[ https://issues.apache.org/jira/browse/HDFS-7057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milan Desai updated HDFS-7057: ------------------------------ Attachment: HDFS-7057-3.patch 1. Changed RawLocalFileSystem.truncate() to check that the path exists, the path is not a directory, and the new length is <= old length (emulated append() for the Exception messages). I added the length check to the client-side Truncate.class command as well. 2. Made the JavaDoc for FileSystem.truncate() match the specification in the design doc, borrowing from ClientProtocol. 3. Updated the command line messages for truncate, including telling the user to wait for block recovery to complete when necessary. > 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-3.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)