MCPcopy Create free account
hub / github.com/apache/impala / HdfsConfig

Class HdfsConfig

tests/util/hdfs_util.py:36–47  ·  view source on GitHub ↗

Reads an XML configuration file (produced by a mini-cluster) into a dictionary accessible via get()

Source from the content-addressed store, hash-verified

34
35
36class HdfsConfig(object):
37 """Reads an XML configuration file (produced by a mini-cluster) into a dictionary
38 accessible via get()"""
39 def __init__(self, *filename):
40 self.conf = {}
41 for arg in filename:
42 tree = parse(arg)
43 for property in tree.getroot().iter('property'):
44 self.conf[property.find('name').text] = property.find('value').text
45
46 def get(self, key):
47 return self.conf.get(key)
48
49
50# Configuration object for the configuration that the minicluster will use.

Callers 4

setup_classMethod · 0.90
hdfs_util.pyFile · 0.85
get_default_hdfs_configFunction · 0.85

Calls

no outgoing calls

Tested by 1

setup_classMethod · 0.72