Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Not A Problem
-
None
-
None
-
None
-
None
Description
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
$ ./hdfs dfs -truncate -w 2 /file
Truncated /file to length: 2
$ ./hdfs dfs -cat /file
ab
Expecting to throw Truncate Error:
-truncate: Cannot truncate to a larger file size. Current size: 2, truncate size: 2