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

Function start_hdfs

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

Source from the content-addressed store, hash-verified

93 f.close()
94
95def start_hdfs(args):
96 cmd_prefix = '/opt/hadoop-1.2.1/bin/hadoop-daemon.sh --config /opt/hadoop-1.2.1/'
97 if args.mode == 'master':
98 p = subprocess.Popen('/opt/hadoop-1.2.1/bin/hadoop namenode -format', stdout=subprocess.PIPE, shell=True)
99 print p.stdout.read()
100 p = subprocess.Popen(cmd_prefix + 'conf start namenode', stdout=subprocess.PIPE, shell=True)
101 print p.stdout.read()
102 p = subprocess.Popen(cmd_prefix + 'conf --hosts masters start secondarynamenode', stdout=subprocess.PIPE, shell=True)
103 print p.stdout.read()
104 else:
105 p = subprocess.Popen(cmd_prefix + 'conf start datanode', stdout=subprocess.PIPE, shell=True)
106 print p.stdout.read()
107
108def doing_nothing():
109 while True:

Callers 1

mainFunction · 0.70

Calls 1

readMethod · 0.80

Tested by

no test coverage detected