I don't get it. Doesn't this disable reads in safemode completely?
We've here only thought of safemode being toggled upon NN startup but there's a case of NN entering safemode manually by an admin and in this scenario reads can and should work fully. Please explain why we wish to cripple this scenario/feature too, we've had customers rely on it in past.
By definition of safemode, its always been to prevent edits (any edits to namespace) not reads (which do NOT touch namespace). This breaks the whole concept around that, going by the release note "getBlockLocations(), and hence open() for read, will now throw SafeModeException if the NameNode is still in safe mode and there are no replicas reported yet for one of the blocks in the file.".
If am grossly wrong, let me know. This may have also started failing the test TestFileLengthOnClusterRestart.