HDFS-2070. Add more unit tests for FsShell getmerge (Daniel Templeton via Colin P. McCabe)
This commit is contained in:
parent
7d6687fe76
commit
c006c3a1e6
@ -874,6 +874,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
|
|
||||||
HDFS-8965. Harden edit log reading code against out of memory errors (cmccabe)
|
HDFS-8965. Harden edit log reading code against out of memory errors (cmccabe)
|
||||||
|
|
||||||
|
HDFS-2070. Add more unit tests for FsShell getmerge (Daniel Templeton via
|
||||||
|
Colin P. McCabe)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||||
|
@ -5268,7 +5268,126 @@
|
|||||||
</test>
|
</test>
|
||||||
|
|
||||||
<!-- Tests for getmerge -->
|
<!-- Tests for getmerge -->
|
||||||
<!-- Manual Testing -->
|
<test> <!-- TESTED -->
|
||||||
|
<description>getmerge: basic</description>
|
||||||
|
<test-commands>
|
||||||
|
<command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
|
||||||
|
<command>-cat CLITEST_DATA/file</command>
|
||||||
|
</test-commands>
|
||||||
|
<cleanup-commands>
|
||||||
|
<command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
||||||
|
<command>rm data</command>
|
||||||
|
</cleanup-commands>
|
||||||
|
<comparators>
|
||||||
|
<comparator>
|
||||||
|
<type>ExactComparator</type>
|
||||||
|
<expected-output>12345678901234
|
||||||
|
12345678901234
|
||||||
|
12345678901234
|
||||||
|
</expected-output>
|
||||||
|
</comparator>
|
||||||
|
</comparators>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
<test> <!-- TESTED -->
|
||||||
|
<description>getmerge: with file</description>
|
||||||
|
<test-commands>
|
||||||
|
<command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes CLITEST_DATA/file</command>
|
||||||
|
<command>-cat CLITEST_DATA/file</command>
|
||||||
|
</test-commands>
|
||||||
|
<cleanup-commands>
|
||||||
|
<command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
||||||
|
<command>rm data</command>
|
||||||
|
</cleanup-commands>
|
||||||
|
<comparators>
|
||||||
|
<comparator>
|
||||||
|
<type>ExactComparator</type>
|
||||||
|
<expected-output>12345678901234
|
||||||
|
</expected-output>
|
||||||
|
</comparator>
|
||||||
|
</comparators>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
<test> <!-- TESTED -->
|
||||||
|
<description>getmerge: with multiple files</description>
|
||||||
|
<test-commands>
|
||||||
|
<command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -getmerge /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
|
||||||
|
<command>-cat CLITEST_DATA/file</command>
|
||||||
|
</test-commands>
|
||||||
|
<cleanup-commands>
|
||||||
|
<command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
||||||
|
<command>rm data</command>
|
||||||
|
</cleanup-commands>
|
||||||
|
<comparators>
|
||||||
|
<comparator>
|
||||||
|
<type>ExactComparator</type>
|
||||||
|
<expected-output>12345678901234
|
||||||
|
12345678901234
|
||||||
|
12345678901234
|
||||||
|
</expected-output>
|
||||||
|
</comparator>
|
||||||
|
</comparators>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
<test> <!-- TESTED -->
|
||||||
|
<description>getmerge: with newlines</description>
|
||||||
|
<test-commands>
|
||||||
|
<command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1 CLITEST_DATA/file</command>
|
||||||
|
<command>-cat CLITEST_DATA/file</command>
|
||||||
|
</test-commands>
|
||||||
|
<cleanup-commands>
|
||||||
|
<command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
||||||
|
<command>rm data</command>
|
||||||
|
</cleanup-commands>
|
||||||
|
<comparators>
|
||||||
|
<comparator>
|
||||||
|
<type>ExactComparator</type>
|
||||||
|
<expected-output>12345678901234
|
||||||
|
|
||||||
|
12345678901234
|
||||||
|
12345678901234
|
||||||
|
|
||||||
|
</expected-output>
|
||||||
|
</comparator>
|
||||||
|
</comparators>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
<test> <!-- TESTED -->
|
||||||
|
<description>getmerge: with multiple files and newlines</description>
|
||||||
|
<test-commands>
|
||||||
|
<command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
||||||
|
<command>-fs NAMENODE -getmerge -nl /user/USERNAME/dir1/data15bytes /user/USERNAME/dir1/data30bytes CLITEST_DATA/file</command>
|
||||||
|
<command>-cat CLITEST_DATA/file</command>
|
||||||
|
</test-commands>
|
||||||
|
<cleanup-commands>
|
||||||
|
<command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
||||||
|
<command>rm data</command>
|
||||||
|
</cleanup-commands>
|
||||||
|
<comparators>
|
||||||
|
<comparator>
|
||||||
|
<type>ExactComparator</type>
|
||||||
|
<expected-output>12345678901234
|
||||||
|
|
||||||
|
12345678901234
|
||||||
|
12345678901234
|
||||||
|
|
||||||
|
</expected-output>
|
||||||
|
</comparator>
|
||||||
|
</comparators>
|
||||||
|
</test>
|
||||||
|
|
||||||
<!-- Tests for cat -->
|
<!-- Tests for cat -->
|
||||||
<test> <!-- TESTED -->
|
<test> <!-- TESTED -->
|
||||||
@ -16515,27 +16634,6 @@
|
|||||||
</comparators>
|
</comparators>
|
||||||
</test>
|
</test>
|
||||||
|
|
||||||
<test>
|
|
||||||
<description>getmerge</description>
|
|
||||||
<test-commands>
|
|
||||||
<command>-fs NAMENODE -mkdir -p /user/USERNAME/dir1</command>
|
|
||||||
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data15bytes /user/USERNAME/dir1</command>
|
|
||||||
<command>-fs NAMENODE -copyFromLocal CLITEST_DATA/data30bytes /user/USERNAME/dir1</command>
|
|
||||||
<command>-fs NAMENODE -getmerge /user/USERNAME/dir1 CLITEST_DATA/file</command>
|
|
||||||
<command>-cat CLITEST_DATA/file</command>
|
|
||||||
</test-commands>
|
|
||||||
<cleanup-commands>
|
|
||||||
<command>-fs NAMENODE -rm -r /user/USERNAME CLITEST_DATA/file</command>
|
|
||||||
<command>rm data</command>
|
|
||||||
</cleanup-commands>
|
|
||||||
<comparators>
|
|
||||||
<comparator>
|
|
||||||
<type>RegexpComparator</type>
|
|
||||||
<expected-output>12345678901234.*</expected-output>
|
|
||||||
</comparator>
|
|
||||||
</comparators>
|
|
||||||
</test>
|
|
||||||
|
|
||||||
<!-- Tests for snapshots -->
|
<!-- Tests for snapshots -->
|
||||||
<test>
|
<test>
|
||||||
<description>allowSnapshot</description>
|
<description>allowSnapshot</description>
|
||||||
|
Loading…
Reference in New Issue
Block a user