ossReader读取大txt文件时报错。
2019-11-26 15:13:56.621 [0-0-0-reader] ERROR ReaderRunner - Reader runner Received Exceptions:
com.alibaba.datax.common.exception.DataXException: Code:[UnstructuredStorageReader-09], Description:[您配置的文件在读取时出现IO异常.]. - 读取文件错误 : [/*//***/20191123/__a33d7039ac7a4782b068c3e7a1c36f40] - org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 254627338; received: 70096229
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:180)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at com.aliyun.oss.event.ProgressInputStream.read(ProgressInputStream.java:116)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.read1(BufferedReader.java:212)
at java.io.BufferedReader.read(BufferedReader.java:286)
at com.csvreader.CsvReader.checkDataLength(Unknown Source)
at com.csvreader.CsvReader.readRecord(Unknown Source)
at com.alibaba.datax.plugin.unstructuredstorage.reader.UnstructuredStorageReaderUtil.splitBufferedReader(UnstructuredStorageReaderUtil.java:72)
at com.alibaba.datax.plugin.unstructuredstorage.reader.UnstructuredStorageReaderUtil.doReadFromStream(UnstructuredStorageReaderUtil.java:288)
at com.alibaba.datax.plugin.unstructuredstorage.reader.UnstructuredStorageReaderUtil.readFromStream(UnstructuredStorageReaderUtil.java:214)
at com.alibaba.datax.plugin.reader.ossreader.OssReader$Task.startRead(OssReader.java:302)
at com.alibaba.datax.core.taskgroup.runner.ReaderRunner.run(ReaderRunner.java:57)
at java.lang.Thread.run(Thread.java:748)
at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:33) ~[datax-common-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.unstructuredstorage.reader.UnstructuredStorageReaderUtil.doReadFromStream(UnstructuredStorageReaderUtil.java:302) ~[plugin-unstructured-storage-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.unstructuredstorage.reader.UnstructuredStorageReaderUtil.readFromStream(UnstructuredStorageReaderUtil.java:214) ~[plugin-unstructured-storage-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.reader.ossreader.OssReader$Task.startRead(OssReader.java:302) ~[sanchro-base-ossreader-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.taskgroup.runner.ReaderRunner.run(ReaderRunner.java:57) ~[datax-core-0.0.1-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 254627338; received: 70096229
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:180) ~[httpcore-4.4.jar:4.4]
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137) ~[httpclient-4.4.jar:4.4]
at java.io.FilterInputStream.read(FilterInputStream.java:133) ~[na:1.8.0_191]
at com.aliyun.oss.event.ProgressInputStream.read(ProgressInputStream.java:116) ~[aliyun-sdk-oss-2.2.3.jar:na]
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) ~[na:1.8.0_191]
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) ~[na:1.8.0_191]
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) ~[na:1.8.0_191]
at java.io.InputStreamReader.read(InputStreamReader.java:184) ~[na:1.8.0_191]
at java.io.BufferedReader.fill(BufferedReader.java:161) ~[na:1.8.0_191]
at java.io.BufferedReader.read1(BufferedReader.java:212) ~[na:1.8.0_191]
at java.io.BufferedReader.read(BufferedReader.java:286) ~[na:1.8.0_191]
at com.csvreader.CsvReader.checkDataLength(Unknown Source) ~[javacsv-2.0.jar:na]
at com.csvreader.CsvReader.readRecord(Unknown Source) ~[javacsv-2.0.jar:na]
at com.alibaba.datax.plugin.unstructuredstorage.reader.UnstructuredStorageReaderUtil.splitBufferedReader(UnstructuredStorageReaderUtil.java:72) ~[plugin-unstructured-storage-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.unstructuredstorage.reader.UnstructuredStorageReaderUtil.doReadFromStream(UnstructuredStorageReaderUtil.java:288) ~[plugin-unstructured-storage-util-0.0.1-SNAPSHOT.jar:na]
... 4 common frames omitted
Exception in thread "taskGroup-0" com.alibaba.datax.common.exception.DataXException: Code:[UnstructuredStorageReader-09],
2条答案
按热度按时间vkc1a9a21#
解决了吗? 我读取csv文件也出现这个问题了
xsuvu9jc2#
我将channel的数量设置超过2的时候也是报同样的错误