Looking at TestHFileBlock.writeBlocks I see this:
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:
This leads to more reasonable block sizes between ~200 and 3000 bytes