Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9322

Keep order of addresses to nameservice mapping from configuration file

    XMLWordPrintableJSON

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.

      Attachments

        1. HDFS-9322.patch_1
          1.0 kB
          Rafal Wojdyla

        Activity

          People

            ravwojdyla Rafal Wojdyla
            ravwojdyla Rafal Wojdyla
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: