Rafal Wojdyla created HDFS-9322:
-----------------------------------
Summary: Keep order of addresses to nameservice mapping from
configuration file
Key: HDFS-9322
URL: https://issues.apache.org/jira/browse/HDFS-9322
Project: Hadoop HDFS
Issue Type: Bug
Affects Versions: 2.7.1
Reporter: Rafal Wojdyla
Assignee: Rafal Wojdyla
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:
{code}
/**
* 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.
*/
{code}
One solution is to use LinkedHashMap which is insertion-ordered.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)