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

In HDFS HA setup, FileSystem.getUri returns hdfs://<dfs.nameservices>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 2.2.0
    • None
    • ha
    • None

    Description

      When hdfs is set up with HA enable, FileSystem.getUri returns hdfs://<the-value-of-dfs.nameservices>
      Here dfs.nameservices is defined when HA is enabled. In documentation:

      dfs.nameservices - the logical name for this new nameserviceChoose a logical name for this nameservice, for example "mycluster", and use this logical name for the value of this config option. The name you choose is arbitrary. It will be used both for configuration and as the authority component of absolute HDFS paths in the cluster.
      Note: If you are also using HDFS Federation, this configuration setting should also include the list of other nameservices, HA or otherwise, as a comma-separated list.
      <property>
      <name>dfs.nameservices</name>
      <value>mycluster</value>
      </property>

      This is probably ok or even intended. But a caller may further process the URI, for example, call URI.getHost(). This will return the 'mycluster', which is not a valid host anywhere.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jinghe Jerry He
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: