tools/bdconfig/lib/google_hadoop/bdconfig_lib/config_commands.py
def _ExtractNamenodeUriFromRpcAddress(self):
    """Tries finding namenode rpc-address as substitute for namenode uri."""
    logging.warn('--namenode_uri not specified. Checking in hdfs-site.xml')
    hdfs_site_file_name = os.path.join(
        self._flags.hadoop_conf_dir, 'hdfs-site.xml')
    conf = xml_configuration.Configuration.FromFile(hdfs_site_file_name)
    namenode_address = conf.GetPropertyValue('dfs.namenode.rpc-address')
    if not namenode_address:
      raise KeyError('dfs.namenode.rpc-address not found in hdfs-site.xml')
    else:
      logging.warn('dfs.namenode.rpc-address found as "{0}". '
                   'Using for fs.default.name'.format(namenode_address))
      return namenode_address
Tries finding namenode rpc-address as substitute for namenode uri.
Tries finding namenode rpc-address as substitute for namenode uri.
Tries finding namenode rpc - address as substitute for namenode uri .
def _ExtractNamenodeUriFromRpcAddress(self):
    logging.warn('--namenode_uri not specified. Checking in hdfs-site.xml')
    hdfs_site_file_name = os.path.join(
        self._flags.hadoop_conf_dir, 'hdfs-site.xml')
    conf = xml_configuration.Configuration.FromFile(hdfs_site_file_name)
    namenode_address = conf.GetPropertyValue('dfs.namenode.rpc-address')
    if not namenode_address:
      raise KeyError('dfs.namenode.rpc-address not found in hdfs-site.xml')
    else:
      logging.warn('dfs.namenode.rpc-address found as "{0}". '
                   'Using for fs.default.name'.format(namenode_address))
      return namenode_address
def _ExtractNamenodeUriFromRpcAddress ( self ) : logging . warn ( '--namenode_uri not specified. Checking in hdfs-site.xml' ) hdfs_site_file_name = os . path . join ( self . _flags . hadoop_conf_dir , 'hdfs-site.xml' ) conf = xml_configuration . Configuration . FromFile ( hdfs_site_file_name ) namenode_address = conf . GetPropertyValue ( 'dfs.namenode.rpc-address' ) if not namenode_address : raise KeyError ( 'dfs.namenode.rpc-address not found in hdfs-site.xml' ) else : logging . warn ( 'dfs.namenode.rpc-address found as "{0}". ' 'Using for fs.default.name' . format ( namenode_address ) ) return namenode_address
Tries finding namenode rpc-address as substitute for namenode uri.
Tries finding namenode rpc - address as substitute for namenode uri .
"""Tries finding namenode rpc-address as substitute for namenode uri."""
self