Class TestParsePartialWALFile

java.lang.Object
org.apache.hadoop.hbase.wal.TestParsePartialWALFile

public class TestParsePartialWALFile extends Object
In this test, we write a small WAL file first, and then generate partial WAL file which length is in range [0, fileLength)(we test all the possible length in the range), to see if we can successfully get the completed entries, and also get an EOF at the end.

It is very important to make sure 3 things:

  • We do not get incorrect entries. Otherwise there will be data corruption.
  • We can get all the completed entries, i.e, we do not miss some data. Otherwise there will be data loss.
  • We will get an EOF finally, instead of a general IOException. Otherwise the split or replication will be stuck.