hive Caused by: java.io.EOFException: Unexpected end of input stream排查

一个常跑的SQL突然运行失败,重试也无法解决,具体报错如下:

hive Caused by: java.io.EOFException: Unexpected end of input stream排查hive Caused by: java.io.EOFException: Unexpected end of input stream排查hive Caused by: java.io.EOFException: Unexpected end of input stream排查

Caused by: java.io.EOFException: Unexpected end of input stream


这个错误初看是由于输入文件IO无法正确解释导致,container日志显示的都是task直接被杀。

由于SQL较长通过报错stage定位具体SQL段Launching Job 5 out of 8,是由于stage 5的SQL段运行失败,从而单独执行SQL段出现同样的错误:

hive Caused by: java.io.EOFException: Unexpected end of input stream排查hive Caused by: java.io.EOFException: Unexpected end of input stream排查


接下来直接下载hdfs上的文件排查文件是否完整,果然:

hive Caused by: java.io.EOFException: Unexpected end of input stream排查


由于爬虫下载的gz文件损坏,导致hiveql无法正常运行,问题解决。