Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit stdout redirection to avoid broken pipes #38

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

Permit stdout redirection to avoid broken pipes #38

jlewi opened this issue May 9, 2011 · 1 comment

Comments

@jlewi
Copy link

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
Copy link

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
Projects
None yet
Development

No branches or pull requests

2 participants