From b5ac85f103033a02802a90faf8361d700931dcc9 Mon Sep 17 00:00:00 2001 From: chenshuaihua Date: Sun, 11 Jan 2015 23:19:04 +0800 Subject: [PATCH] yarn script --- tracker/rabit_yarn.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tracker/rabit_yarn.py b/tracker/rabit_yarn.py index 2f896b2af..9922b55d2 100644 --- a/tracker/rabit_yarn.py +++ b/tracker/rabit_yarn.py @@ -46,7 +46,14 @@ parser.add_argument('-f', '--files', nargs = '*', ' the submission script will automatically cache all the files which appears in command.'\ ' You may need this option to cache additional files.'\ ' You can also use it to manually cache files when auto_file_cache is off') -parser.add_argument('--jobname', help = 'customize jobname in tracker') +parser.add_argument('--jobname', default='auto', help = 'customize jobname in tracker') +parser.add_argument('--timeout', default=600000000, type=int, + help = 'timeout (in million seconds) of each mapper job, automatically set to a very long time,'\ + 'normally you do not need to set this ') +parser.add_argument('-m', '--memory_mb', default=1024, type=int, + help = 'maximum memory used by the process, Guide: set it large (near mapreduce.jobtracker.maxmapmemory.mb).'\ + 'if you are running multi-threading rabit,'\ + 'so that each node can occupy all the mapper slots in a machine for maximum performance') if hadoop_binary == None: parser.add_argument('-hb', '--hadoop_binary', required = True, help="path-to-hadoop binary folder") @@ -71,6 +78,8 @@ def hadoop_streaming(nworker, slave_args): cmd = '%s jar %s -D mapreduce.job.maps=%d' % (args.hadoop_binary, args.hadoop_streaming_jar, nworker) cmd += ' -D mapreduce.job.name=%s' % (args.jobname) cmd += ' -D mapreduce.map.cpu.vcores=%d' % (args.nthread) + cmd += ' -D mapreduce.task.timeout=%d' % (args.timeout) + cmd += ' -D mapreduce.map.memory.mb=%d' % (args.memory_mb) cmd += ' -input %s -output %s' % (args.input, args.output) cmd += ' -mapper \"%s\" -reducer \"/bin/cat\" ' % (' '.join(args.command + slave_args)) fset = set()