code: def get_config_from_env(cls):
          
          core_path = os.path.join(os.environ['HADOOP_HOME'], 'conf', 'core-site.xml')
          core_configs = cls.read_core_config(core_path)
  
          hdfs_path = os.path.join(os.environ['HADOOP_HOME'], 'conf', 'hdfs-site.xml')
          hdfs_configs = cls.read_hdfs_config(hdfs_path)
  
          if (not core_configs) and (not hdfs_configs):
              raise Exception("No config found in %s nor in %s" % (core_path, hdfs_path))
  
          configs = {
              'use_trash': hdfs_configs.get('use_trash', core_configs.get('use_trash', False)),
              'use_sasl': core_configs.get('use_sasl', False),
              'hdfs_namenode_principal': hdfs_configs.get('hdfs_namenode_principal', None),
              'namenodes': hdfs_configs.get('namenodes', []) or core_configs.get('namenodes', [])
          }
  
          return configs
docs: .. deprecated:: 2.5.3
          Gets configuration out of environment.
  
          Returns list of dicts - list of namenode representations