MCPcopy Create free account
hub / github.com/baidu/tera / write_hdfs_site_xml

Function write_hdfs_site_xml

example/docker/hdfs_setup.py:57–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 f.close()
56
57def write_hdfs_site_xml():
58 doc, hdfssite = get_doc()
59 prop = write_property(doc, 'dfs.name.dir', share_path_prefix + 'name', True)
60 hdfssite.appendChild(prop)
61 prop = write_property(doc, 'dfs.data.dir', share_path_prefix + 'data', True)
62 hdfssite.appendChild(prop)
63 prop = write_property(doc, 'dfs.replication', '3', True)
64 hdfssite.appendChild(prop)
65
66 f = open(conf_path_prefix + 'hdfs-site.xml', 'wb')
67 f.write(doc.toprettyxml(indent = ''))
68 f.close()
69
70def write_mapred_site_xml(args):
71 doc, mapredsite = get_doc()

Callers 1

mainFunction · 0.85

Calls 3

get_docFunction · 0.85
write_propertyFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected