Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.7.1
-
None
-
None
Description
getAddressesForNameserviceId which is used by ConfiguredFailoverProxyProvider does not keep order of namenodes/addresses from configuration file - instead it relays on order given by HashMap (key is service id) which is misaligned with comment/doc in ConfiguredFailoverProxyProvider that says:
/** * A FailoverProxyProvider implementation which allows one to configure two URIs * to connect to during fail-over. The first configured address is tried first, * and on a fail-over event the other address is tried. */
One solution is to use LinkedHashMap which is insertion-ordered.