HIVE查询报错Unexpected end of input stream

HIVE查询报错Unexpected end of input stream


导致报Unexpected end of input stream的原因有以下几点:

  1. hdfs中所查询的文件有个别损坏。
  2. gz格式压缩的有问题
  3. 文件没有正确结束,例如.gz
  4. 文件数据有问题

错误如图:

HIVE查询报错Unexpected end of input stream

我的查询语句是 select Count(1) from table;


这里提供找到损坏文件的方法两则:

 

  1. 采用二分法,如果是分区,逐一排查。逐一缩小排查圈,直到定位错误文件。
  2. 如果是整文件,删除重新生成上传
  3. 报错时,提供了日志存放路径,粘贴url到浏览器。HIVE查询报错Unexpected end of input stream

地址不同时,在任意主机ping 23188前的地址,就能得到真实地址,然后进入如下页面:

HIVE查询报错Unexpected end of input stream

根据启动查询时给出的applictionID 找到对应的任务,点进去

 

HIVE查询报错Unexpected end of input stream

 

点进去之后进入下一个页面,点击红框中的logs

HIVE查询报错Unexpected end of input stream

找到对应的information,点进去,如图

HIVE查询报错Unexpected end of input stream

点击最后一个阅读就可以了,文件有点大