Yelp/mrjob — pull request #363 by BrandonHaynes (2012-02-13 15:06:20+00:00)
Title: Corrects issue with a non-string jobconf variable in local runner

As part of my job initialization, I am specifying a desired number of reducers (where n is an integer):

self.options.jobconf['mapred.reduce.tasks'] = n

After upgrading from 0.2.x to 0.3.1, I began receiving the following error while using a local runner:

File "/.../mrjob/local.py", line 583, in _invoke_process
cwd=self._working_dir, env=env)
...
TypeError: execve() arg 3 contains a non-string value

Clearly this is due to the environment being passed to Popen containing non-string values.

While I could manually convert my jobconf values to strings prior to assignment (and this does correct this issue), this feels a bit unnatural and unnecessary. Other runners (e.g. Amazon EMR) do not require this conversion.

I suggest performing this conversion explicitly within the local runner to minimize surprise.