In downstream project, I saw the following code:
The above tightly depends on the following in DFSInputStream#readBlockLength
The check based on string matching is brittle in production deployment.
After discussing with email@example.com, better approach is to introduce specialized IOException, e.g. CannotObtainBlockLengthException so that downstream project doesn't have to rely on string matching.