Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.12.0
-
None
-
None
Description
WebHdfsHaDispatch checks return status for 403 for StandbyException and SafeModeException and raises context accurate exceptions.
FileAlreadyExistsException is also surfaced from WebHDFS as a 403 but is not captured explicitly and the error handling falls through to catching IOException which then conducts failoverRequest as if it is a StandbyException.
The strange thing is 403 with the FileAlreadyExistsException does return sometimes. I think this has to do with where the rounds of NN HA failover end up lying. With a default of three, it can fall on a standby namenode and 500 is returned. Other times the correct 403 are returned after the default of three failover attempts.
This was seen on 0.12.0 but master branch code hasn't change enough to alter this behavior.