java.nio.charset.MalformedInputException: Input length = 1

异常信息:

2019-12-05 15:43:05,589 (pool-5-thread-1) [ERROR - org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run(SpoolDirectorySource.java:280)] FATAL: Spool Directory source r1: {
      spoolDir: /export/servers/dirfile }: Uncaught exception in SpoolDirectorySource thread. Restart or reconfigure Flume to continue processing.
java.nio.charset.MalformedInputException: Input length = 1
        at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
        at org.apache.flume.serialization.ResettableFileInputStream.readChar(ResettableFileInputStream.java:283)
        at org.apache.flume.serialization.LineDeserializer.readLine(LineDeserializer.java:132)
        at org.apache.flume.serialization.LineDeserializer.readEvent(LineDeserializer.java:70)
        at org.apache.flume.serialization.LineDeserializer.readEvents(LineDeserializer.java:89)
        at org.apache.flume.client.avro.ReliableSpoolingFileEventReader.readDeserializerEvents(ReliableSpoolingFileEventReader.java:343)
        at org.apache.flume.client.avro.ReliableSpoolingFileEventReader.readEvents(ReliableSpoolingFileEventReader.java:318)
        at org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run(SpoolDirectorySource.java:250)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

导致原因:
(1)读取汉字和“;"符号的txt文档
(2)读取数字和”;“符号的txt文档
(3)读取数字和”回车符“的txt文档
(4)读取数字,字母,汉字组成的csv文件
(5)读取数字和汉字组成的txt文件
(6)目录下有无法识别的 或者 编码不一致

你可能感兴趣的:(大数据,Flume)