I have some files on the HDFS, and I try to use command
hadoop fs -text filename | head -10
after exec the command, it always returns the first 10 lines to the terminal, and it's what I want, but it always returns a line "text: Unable to write to output stream." attached to it, I feel very confused about what the attached line means.
I am assuming you are trying to read a compressed file. Anyhow head
closed the stream after it read its limit hence, hadoop throw'ed a warning saying "text: Unable to write to output stream." because head
has already closed the stream to which hadoop's text
is trying to write to.
Take a look at this related answer as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With