Permit stdout redirection to avoid broken pipes #38

Open
jlewi opened this Issue May 9, 2011 · 1 comment

Comments

Projects
None yet
2 participants

jlewi commented May 9, 2011

One of the frustrating problems I've been running into is that if I
have "print statements" in code called by my mapper/reducer this will
break the pipe used by my streaming job.

It seems like a simple change to dumbo can fix this.
In core.py change
typedbytes.PairedOutput(sys.stdout).writes(outputs)

to
typedbytes.PairedOutput(sys.stdout).writes(outputs)

This way all we have to do is redirect stdout to stderr and extraneous
print statements will no longer cause problems.

I've tried this out and it seems to work for me.

bwhite commented Jul 9, 2011

I apologize for the cross post but this is how I fixed this problem in Hadoopy
http://bwhite.github.com/hadoopy/#pipe-hopping-using-stdout-stderr-in-hadoopy-jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment