报错日志:

 java.lang.IllegalStateException: File name has been re-used with different files. Spooling assumptions violated for /usr/local/data/flumedata/words.txt.COMPLETED
at org.apache.flume.client.avro.ReliableSpoolingFileEventReader.rollCurrentFile(ReliableSpoolingFileEventReader.java:378)
at org.apache.flume.client.avro.ReliableSpoolingFileEventReader.retireCurrentFile(ReliableSpoolingFileEventReader.java:330)
at org.apache.flume.client.avro.ReliableSpoolingFileEventReader.readEvents(ReliableSpoolingFileEventReader.java:259)
at org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run(SpoolDirectorySource.java:228)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

原因:
重复使用了同一个数据文件
解决方案1:
更改flume的配置文件conf的目录
a1.sources.r1.spoolDir = /usr/local/data/flumedata

#push mode
a1.sources = r1
a1.sinks = k1
a1.channels = c1
#source
a1.sources.r1.channels = c1
a1.sources.r1.type = spooldir
a1.sources.r1.spoolDir = /usr/local/data/flumedata
a1.sources.r1.fileHeader = true
#channel
a1.channels.c1.type =memory
a1.channels.c1.capacity = 20000
a1.channels.c1.transactionCapacity=5000
#sinks
a1.sinks.k1.channel = c1
a1.sinks.k1.type = avro
a1.sinks.k1.hostname=192.168.13.24
a1.sinks.k1.port = 9999
a1.sinks.k1.batchSize= 2000

解决方案2:
在flume配置文件的目录下重新定义数据文件

java.lang.IllegalStateException: File name has been re-used with different files. (flume报错)的更多相关文章

  1. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  2. Springboot 上传报错: Failed to parse multipart servlet request; nested exception is java.lang.IllegalStateException: The multi-part request contained parameter data (excluding uploaded files) that exceede

    Failed to parse multipart servlet request; nested exception is java.lang.IllegalStateException: The ...

  3. Eclipse------使用Debug As时报错java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/XXX

    报错信息: java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file ...

  4. java.lang.IllegalStateException: Zip File is closed

    最近在研究利用sax读取excel大文件时,出现了以下的错误: java.lang.IllegalStateException: Zip File is closed at org.apache.po ...

  5. myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).

    把myeclipse10 按照目录完整拷贝到了另外一台电脑, 另外的目录 原安装目录 D\:\soft\i\myeclipse10 新安装目录 E\:\soft\myeclipse10 双击启动失败, ...

  6. java.lang.IllegalStateException:Web app root system property already set to different value 错误原因及解决 Log4j

    Log4j是Apache的一个开放源代码项目,通过使用Log4j,我们可以控制日志信息输送的目的地是控制台.文件.GUI组件.甚至是套接口 服务器.NT的事件记录器.UNIX Syslog守护进程等: ...

  7. struts2 下载时报java.lang.IllegalStateException

    -----------------------------------------struts2 下载时报java.lang.IllegalStateException---------------- ...

  8. 处理eclipse启动时报java.lang.IllegalStateException

    这是我写的第一篇博客,博客我来了: 我是好学的人,希望在这上面遇到志同道合的人,对技术有更高追求的人: 重启eclipse的时候报出来 An error has occurred, See the l ...

  9. 解决java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext这个问题

    今天在运行别人的SSH项目时,遇到了这个问题 严重: Exception sending context initialized event to listener instance of class ...

  10. Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"

    报错信息如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ding ...

随机推荐

  1. C++顺序结构(1)任务

    1.下载并观看视频(照着做,多看几遍) https://www.jianguoyun.com/p/DWCNkNEQi8_wDBj5ptYFIAA 2.两项照着做的任务

  2. js面试题-代码实现

    新 API 最新的 url 参数获取的 API? URLSearchParams // 有如下一个url: http://localhost?a=1&b=2 function getUrlPa ...

  3. 2.mysql授权认证

    权限系统介绍 ● 什么是权限系统 权限系统是授予来自某个主机的某个用户可以查询.插入.修改.删除等数据库操作的权限 不能明确的指定拒接某个用户的连接 权限控制(授权与收回)的执行语句包括 create ...

  4. iOS app 自动化测试 - 环境搭建

    1. 基本前提 安装好了 mac 上自动化测试的基本环境 如果没有,可以参考这一个: 2. iOS appium python自动化测试环境搭建 2.1 真机环境 2.1.1 前提:安装了 appiu ...

  5. Qt/C++推流程序(视频文件/视频流/摄像头/桌面转成流媒体rtmp+hls+webrtc)可在网页和播放器远程观看

    一.前言说明 推流直播就是把采集阶段封包好的内容传输到服务器的过程.其实就是将现场的视频信号从手机端,电脑端,摄影机端打包传到服务器的过程."推流"对网络要求比较高,如果网络不稳定 ...

  6. [转]v-mode 提示错误 v-model directives require the attribute value which is valid as LHS.

    v-mode总是提示错误 v-model  directives require the attribute value which is valid as LHS. 为什么调用过滤总是提示这个错呢? ...

  7. 移动端弱网优化专题(十四):携程APP移动网络优化实践(弱网识别篇)

    本文由携程技术团队Aaron分享,原题"干货 | 携程弱网识别技术探索",下文进行了排版和内容优化. 1.引言 网络优化一直是移动互联网时代的热议话题,弱网识别作为移动端弱网优化的 ...

  8. 『AotuHotKey』——一个小巧却高效的实用效率工具

    [!note] 本来主要是想找一下「」和『』,然后这个方法直接可以找到大部分的特殊字符 通过输入法输出 『Ctr + shift + Z』进入搜狗输入法的『符号大全』 在『标点符号』项可以找到「」和『 ...

  9. Docker 迁移数据目录

    Centos7 环境,采用yum安装的,默认数据目录在/var/lib/docker中 1. 关闭docker服务 systemctl stop docker 2. 备份和迁移 # 迁移 cp -r ...

  10. 基于.NET8.0实现RabbbitMQ的Publish/Subscribe发布订阅以及死信队列

    [前言] RabbitMQ提供了五种消息模型,分别是简单模型.工作队列模型.发布/订阅模型.路由模型和主题模型.‌‌ 简单模型(Simple)‌:在这种模式下,一个生产者将消息发送到一个队列,只有一个 ...