hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo Nicholas Sze (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8505) Truncate should not be success when Truncate Size and Current Size are equal.
Date Fri, 05 Jun 2015 02:37:39 GMT

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

Tsz Wo Nicholas Sze commented on HDFS-8505:
-------------------------------------------

> ... Cannot truncate to a larger file size. Current size: 2, truncate size: 2

No, 2 is not larger than 2.  Truncate should success.  [~shv], do you agree?

> Truncate should not be success when Truncate Size and Current Size are equal.
> -----------------------------------------------------------------------------
>
>                 Key: HDFS-8505
>                 URL: https://issues.apache.org/jira/browse/HDFS-8505
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Archana T
>            Assignee: Brahma Reddy Battula
>            Priority: Minor
>         Attachments: HDFS-8505.patch
>
>
> Truncate should not be success when Truncate Size and Current Size are equal.
> $ ./hdfs dfs -cat /file
> abcdefgh
> $ ./hdfs dfs -truncate -w 2 /file
> Waiting for /file ...
> Truncated /file to length: 2
> $ ./hdfs dfs -cat /file
> ab
> {color:red}
> $ ./hdfs dfs -truncate -w 2 /file
> Truncated /file to length: 2
> {color}
> $ ./hdfs dfs -cat /file
> ab
> Expecting to throw Truncate Error:
> -truncate: Cannot truncate to a larger file size. Current size: 2, truncate size: 2



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

Mime
View raw message