Update submit_job_hadoop.py

This commit is contained in:
Tianqi Chen 2014-12-05 09:10:26 -08:00
parent f9e95ab522
commit e05098cacb

View File

@ -12,7 +12,7 @@ from threading import Thread
def hadoop_streaming(nslaves, slave_args): def hadoop_streaming(nslaves, slave_args):
cmd = '%s jar %s -input %s -output %s -mapper \"%s %s\" -reducer /bin/cat stdin %d %d stdout' % (args.hadoop_binary, args.hadoop_streaming_jar, args.input, args.output, args.mapper, slave_args, args.nclusters, args.iterations) cmd = '%s jar %s -input %s -output %s -mapper \"%s %s\" -reducer /bin/cat stdin %d %d stdout' % (args.hadoop_binary, args.hadoop_streaming_jar, args.input, args.output, args.mapper, ' '.join(slave_args), args.nclusters, args.iterations)
print cmd print cmd
subprocess.check_call(cmd, shell = True) subprocess.check_call(cmd, shell = True)