[ https://issues.apache.org/jira/browse/HDFS-9322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980102#comment-14980102 ]
J.Andreina commented on HDFS-9322: ---------------------------------- That was good catch [~ravwojdyla]. At nameservice level order is maintained, but within each nameservice, namenode id's order is not maintained. Some nits: 1. Need to name the patch as following. <issue-id>-<branch-name>-<patch-version>.patch ex: HDFS-1000-trunk-01.patch 2. Add a testcase for HA case in TestGetConf > 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 > Labels: has-patch > Attachments: HDFS-9322.patch_1 > > > 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)