Yelp/mrjob — Issue #323: fix booleans in jobconf in mrjob.conf
Author: davidmarin
Created: 2011-12-29 00:08:23+00:00
State: open
Labels: Feature

`"true"` and `"false"` are pretty common jobconf values, but if you do something like this:

```yaml
runners:
emr:
jobconf:
mapred.output.compress: true
mapred.output.compression.codec: org.apache.hadoop.io.compress.GzipCodec
```

The `true` gets converted to `True` (Python constant), which then gets passed to Hadoop as the string `True` (uppercase).

The correct thing to do is put the `true` in quotes:

```yaml
runners:
emr:
jobconf:
mapred.output.compress: 'true'
mapred.output.compression.codec: org.apache.hadoop.io.compress.GzipCodec
```

We should catch cases like this, convert the booleans to the appropriate lowercase strings, and issue a warning about the correct way to represent them in YAML.

We should probably do this for numbers too, though there's less chance they'll get converted to a form Hadoop doesn't understand.