经过许多小时的努力,阅读代码和实验,得出的答案是:
您需要添加一个新的BootstrapAction,如下所示:
params = ['-s','mapred.skip.mode.enabled=true', '-s', 'mapred.skip.map.max.skip.records=1', '-s', 'mapred.skip.attempts.to.start.skipping=2', '-s', 'mapred.map.max.attempts=5', '-s', 'mapred.task.timeout=100000']config_bootstrapper = BootstrapAction('Enable skip mode', 's3://elasticmapreduce/bootstrap-actions/configure-hadoop', params)conn = EmrConnection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)step = StreamingStep(name='My Step', ...)conn.run_jobflow(..., bootstrap_actions=[config_bootstrapper], steps=[step], ...)当然,如果您有多个引导程序动作,则应将其添加到bootstrap_actions数组中。



