class_docstr: This class embodies functionality to resolve HDFS namenodes: per default or a nameservice.
docstr: Given the namespace of a name service, resolves the configured list of name nodes, and
  returns them as a list of URL strings.
  
  :param namespace: the HDFS name service to resolve
  :return: a list of URL strings of the name nodes for the given name service; or None of not
      properly configured.
code: def resolve_hdfs_name_service(self, namespace):
      """
      Given the namespace of a name service, resolves the configured list of name nodes, and
      returns them as a list of URL strings.
  
      :param namespace: the HDFS name service to resolve
      :return: a list of URL strings of the name nodes for the given name service; or None of not
          properly configured.
      """
      list_of_namenodes = None
      namenodes = self._hadoop_configuration.get(
          "dfs.ha.namenodes." + namespace
      )
      if namenodes:
          # populate namenode_urls list for the given namespace
          list_of_namenodes = []
          for nn in namenodes.split(","):
              prop_key = "dfs.namenode.rpc-address.{}.{}".format(
                  namespace, nn
              )
              namenode_url = self._hadoop_configuration.get(prop_key)
              if namenode_url:
                  list_of_namenodes.append(namenode_url)
              else:
                  raise RuntimeError(
                      self._build_error_string(
                          'Failed to get property "{}" from'.format(
                              prop_key
                          )
                      )
                  )
      # Don't raise and exception otherwise, because the supplied name could just be a hostname.
      # We don't have an easy way to tell at this point.
      return list_of_namenodes
  
imports: import functools
  import inspect
  import logging
  import os
  from distutils.version import LooseVersion
  from xml.etree import ElementTree
  import pyarrow
  import six
  from pyarrow.hdfs import HadoopFileSystem
  from pyarrow.lib import ArrowIOError
  from six.moves.urllib.parse import urlparse
label_desc: Use image node_id 4 for calling the HdfsNamenodeResolver obj's underlying member method code with example usage: obj.resolve_hdfs_name_service(namespace) and returns: list_of_namenodes