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

Function write_core_site_xml

example/docker/hdfs_setup.py:45–55  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

43 return doc, site
44
45def write_core_site_xml(args):
46 doc, coresite = get_doc()
47 ip = 'hdfs://{name_node}:9000'.format(name_node=args.masters)
48 prop = write_property(doc, 'fs.default.name', ip, True)
49 coresite.appendChild(prop)
50 prop = write_property(doc, 'hadoop.tmp.dir', share_path_prefix + 'tmp', False)
51 coresite.appendChild(prop)
52
53 f = open(conf_path_prefix + 'core-site.xml', 'wb')
54 f.write(doc.toprettyxml(indent = ''))
55 f.close()
56
57def write_hdfs_site_xml():
58 doc, hdfssite = 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