Looking at TestHFileBlock.writeBlocks I see this:
for (int j = 0; j < rand.nextInt(500); ++j) { // This might compress well. dos.writeShort(i + 1); dos.writeInt(j + 1); }
The result is probably not what the author intended. rand.nextInt(500) is evaluated during each iterations and that leads to very small blocks size mostly between ~100 and 300 bytes or so.
The author probably intended this:
int size = rand.nextInt(500); for (int j = 0; j < size; ++j) { // This might compress well. dos.writeShort(i + 1); dos.writeInt(j + 1); }
This leads to more reasonable block sizes between ~200 and 3000 bytes