Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hadoop fs -text file returns "text: Unable to write to output stream."

Tags:

hadoop

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.

like image 744
kemiya Avatar asked Jan 11 '15 00:01

kemiya


1 Answers

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.

like image 118
Ashrith Avatar answered Sep 19 '22 10:09

Ashrith