码迷,mamicode.com
首页 > Web开发 > 详细

flume 使用遇到问题及解决

时间:2014-11-03 22:08:46      阅读:590      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   ar   os   使用   java   sp   

1. ../flume/fchannel/spool/data/ 目录下发生缓存文件积压

  可能原因:同一时间同一客户端下向两个监控目录mv文件;或同一时间多个客户端向服务端上传文件

2.清空../flume/fchannel/spool/data/ 目录下文件重启后,监控目录下的文件发生积压,没有上传

  flume.log里面重复一个异常:

java.lang.IllegalStateException: Channel closed [channel=c1]. Due to java.lang.NullPointerException: null
        at org.apache.flume.channel.file.FileChannel.createTransaction(FileChannel.java:352)
        at org.apache.flume.channel.BasicChannelSemantics.getTransaction(BasicChannelSemantics.java:122)
        at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:181)
        at org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run(SpoolDirectorySource.java:188)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
        at org.apache.flume.channel.file.Log.writeCheckpoint(Log.java:1028)
        at org.apache.flume.channel.file.Log.replay(Log.java:472)
        at org.apache.flume.channel.file.FileChannel.start(FileChannel.java:302)
        at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:251)
        ... 9 more

  原因是:清空../flume/fchannel/spool/data/ 目录下文件的同时也需要清空../flume/fchannel/spool/checkpoint/ 目录下的文件

另,有几个关于flume的问题:

1. flume支持监控目录有子目录的情况,但是同时向两个或多个子目录mv文件的时候,对文件大小有没有限制?

2. flume支持同时多少客户端向同一监控目录下mv文件呢?

3. flume客户端的/opt/soft/flume/fchannel/spool/data目录下的文件的作用是?

4. 怎么有效验证flume客户端上传文件是否成功呢?

flume 使用遇到问题及解决

标签:style   blog   io   color   ar   os   使用   java   sp   

原文地址:http://www.cnblogs.com/-wangjiannan/p/4072108.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!