本文介绍了hadoop fs -text文件返回“text:无法写入输出流”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在HDFS上有一些文件,并尝试使用命令

I have some files on the HDFS, and I try to use command

hadoop fs -text filename | head -10

执行命令后,它总是返回前10行到终端,它是我想要什么,但总是返回一行text:无法写入输出流。

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.

推荐答案

我假设您正在尝试读取压缩文件文件。无论如何 head 在它读取其限制之后关闭了流,因此,hadoop抛出了一个警告text:无法写入输出流。因为已经关闭了hadoop的 text 试图写入的流。

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.

看看这个相关的。

这篇关于hadoop fs -text文件返回“text:无法写入输出流”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 10:12