报错日志:

 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. Intel Pin初探

    1.在/home/hf/Desktop/pin/pin-3.30-98830-g1d7b601b3-gcc-linux/source/tools/ManualExamples/目录下写自己的pinto ...

  2. 【NAS】绿联NAS UGOS PRO 使用natfrp(Sakura Frp)内网穿透访问Docker应用

    配置加速 https://registry.cn-hongkong.aliyuncs.com 下载镜像 创建容器 [容器]-[创建]-[手动创建]- 选择你下载的镜像即可 在日志中查看密码 访问容器 ...

  3. 2024年1月Java项目开发指南13:登录注册实现

    创建文件,如上图 创建好文件后去router.index.js配置路由 import { createRouter, createWebHistory } from 'vue-router'; // ...

  4. .NET 阻止系统睡眠/息屏

    本文介绍Windows系统设备下如何阻止系统睡眠/息屏,以及想看当前阻止睡眠/息屏的应用信息 powercfg /requests查看活动列表 在播放音乐时,我们会发现设置了系统电源管理-自动睡眠,计 ...

  5. opencv中 在特征点匹配代码举例,以及queryIdx和trainIdx的用法

    一.用法 在特征点匹配中,queryIdx和trainIdx是匹配对中的两个索引,用于指示匹配点在不同图像或特征向量中的位置.1.假设我们有两幅图像A和B,并使用特征点提取算法(如SIFT)从它们中提 ...

  6. JavaScript中find()和 filter()方法的区别小结

    前言 JavaScript 在 ES6 上有很多数组方法,每种方法都有独特的用途和好处. 在开发应用程序时,大多使用数组方法来获取特定的值列表并获取单个或多个匹配项. 在列出这两种方法的区别之前,我们 ...

  7. Win10系统安装vue-cli运行环境以及vue在和vue-cli在windows10系统下的默认安装路径(目录)

    WIN10系统安装vue-cli运行环境: 1.Win10系统安装VUE及环境配置解析 2.使用vue-cli创建项目 3.vue在和vue-cli在windows10系统下的默认安装路径(目录)为: ...

  8. IM跨平台技术学习(十二):万字长文详解QQ Linux端实时音视频背后的跨平台实践

    本文由QQ音视频团队贺坤分享原题"Linux QQ能打语音视频了!一文详解背后技术实现!",下文进行了排版和内容优化等. 1.引言 2024年6月6日,QQ For Linux 3 ...

  9. 夜莺监控支持 ES 日志告警了

    夜莺项目( https://github.com/ccfos/nightingale )发布了 v8.0.0-beta.3 版本,这个版本主要是支持了 ES 日志告警,下面给大家介绍一下. 新版本下载 ...

  10. runoob-NumPy(python)

    https://www.runoob.com/numpy/numpy-tutorial.html NumPy 教程 NumPy(Numerical Python) 是 Python 语言的一个扩展程序 ...