I am trying to enable bad input skipping on my Amazon Elastic MapReduce jobs. I am following the wonderful recipe described here:
http://devblog.factual.com/practica
After many hours of struggling, reading code, and experimentation, here is the answer:
You need to add a new BootstrapAction, like so:
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], ...)
Of course, if you have more than one bootstrap action, you should just add it to the bootstrap_actions array.