Skip to content

Commit f97aa8a

Browse files
committed
add comments
1 parent ecb2f50 commit f97aa8a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestParsePartialWALFile.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@
5252
import org.junit.Test;
5353
import org.junit.experimental.categories.Category;
5454

55+
/**
56+
* In this test, we write a small WAL file first, and then generate partial WAL file which length is
57+
* in range [0, fileLength)(we test all the possible length in the range), to see if we can
58+
* successfully get the completed entries, and also get an EOF at the end.
59+
* <p/>
60+
* It is very important to make sure 3 things:
61+
* <ul>
62+
* <li>We do not get incorrect entries. Otherwise there will be data corruption.</li>
63+
* <li>We can get all the completed entries, i.e, we do not miss some data. Otherwise there will be
64+
* data loss.</li>
65+
* <li>We will get an EOF finally, instead of a general IOException. Otherwise the split or
66+
* replication will be stuck.</li>
67+
* </ul>
68+
*/
5569
@Category({ RegionServerTests.class, MediumTests.class })
5670
public class TestParsePartialWALFile {
5771

0 commit comments

Comments
 (0)