Sometimes the test case TestFixedLengthInputFormat#testFormatCompressedIn can fail with the following error:
Root cause: under special circumstances, the following line can return a huge number:
For example, let seed be 2026428718. This causes recordLength to be 1 at iteration 19. Math.floor() returns negative Infinity, which becomes positve infinity after the divison. Casting it to int yields Integer.MAX_VALUE. Eventually we get an OOME because the test wants to create a huge InputSplit array.