diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 1ca2263df5..59d498d641 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -606,6 +606,8 @@ Release 2.7.0 - UNRELEASED HDFS-7743. Code cleanup of BlockInfo and rename BlockInfo to BlockInfoContiguous. (jing9) + HDFS-7058. Tests for truncate CLI. (Dasha Boudnik via shv) + OPTIMIZATIONS HDFS-7454. Reduce memory footprint for AclEntries in NameNode. diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml index 8b221d6180..05546a2553 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/testHDFSConf.xml @@ -17266,5 +17266,41 @@ $ + + truncate to 5 bytes after waiting for block recovery to complete + + -fs NAMENODE -mkdir -p /user/USERNAME/dir0 + -fs NAMENODE -put CLITEST_DATA/data120bytes /user/USERNAME/dir0 + -fs NAMENODE -truncate -w 5 /user/USERNAME/dir0/data120bytes + -fs NAMENODE -cat /user/USERNAME/dir0/data120bytes + + + -fs NAMENODE -rm -r /user/USERNAME/dir0 + + + + RegexpComparator + 12345 + + + + + truncate to greater length than length of file + + -fs NAMENODE -mkdir /user/USERNAME/dir0 + -fs NAMENODE -put CLITEST_DATA/data15bytes /user/USERNAME/dir0 + -fs NAMENODE -truncate -w 50 /user/USERNAME/dir0/data15bytes + -fs NAMENODE -cat /user/USERNAME/dir0/data15bytes + + + -fs NAMENODE -rm -r /user/USERNAME/dir0 + + + + RegexpComparator + 12345678901234 + + +