我在某些mapreduce工作中遇到了这个奇怪的错误
java.io.IOException: invalid distance too far back
at org.apache.hadoop.io.compress.zlib.ZlibDecompressor.inflateBytesDirect(Native Method)
at org.apache.hadoop.io.compress.zlib.ZlibDecompressor.decompress(ZlibDecompressor.java:221)
at org.apache.hadoop.io.compress.DecompressorStream.decompress(DecompressorStream.java:89)
at org.apache.hadoop.io.compress.DecompressorStream.read(DecompressorStream.java:83)
at org.apache.hadoop.io.compress.DecompressorStream.read(DecompressorStream.java:71)
at java.io.DataInputStream.readByte(DataInputStream.java:248)
at com.contextin.io.VersionedWritable.readFields(VersionedWritable.java:60)
at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:73)
at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:44)
at org.apache.hadoop.io.SequenceFile$Reader.deserializeValue(SequenceFile.java:2180)
at org.apache.hadoop.io.SequenceFile$Reader.getCurrentValue(SequenceFile.java:2164)
at org.apache.hadoop.mapred.SequenceFileRecordReader.getCurrentValue(SequenceFileRecordReader.java:103)
at org.apache.hadoop.mapred.SequenceFileRecordReader.next(SequenceFileRecordReader.java:78)
at com.contextin.model.workflow.AggregateFilesMR$CustomKeyValueLineRecordReader.next(AggregateFilesMR.java:632)
at com.contextin.model.workflow.AggregateFilesMR$CustomKeyValueLineRecordReader.next(AggregateFilesMR.java:595)
at org.apache.hadoop.mapred.lib.CombineFileRecordReader.next(CombineFileRecordReader.java:61)
at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.moveToNext(MapTask.java:215)
at org.apache.hadoop.mapred.MapTask$TrackedRecordReader.next(MapTask.java:200)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:48)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
一些事实(可能不相关):
最佳答案
从进一步的测试来看,这似乎是一个数据问题。
单独读取某些文件(而不是mapreduce)会导致该问题。
我没有很好的解释为什么任务失败的次数在两次运行之间会发生变化
关于hadoop - java.io.IOException:在hadoop mapreduce中距离太远的无效距离,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23628128/