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

关于flume配置加载(二)

时间:2016-12-08 20:33:03      阅读:316      评论:0      收藏:0      [点我收藏+]

标签:开始   top   cat   app   流程   on()   processor   sub   event   

为什么翻flume的代码,一方面是确实遇到了问题,另一方面是想翻一下flume的源码,看看有什么收获,现在收获还谈不上,因为要继续总结。不够已经够解决问题了,而且确实有好的代码,后续会继续慢慢分享,这里先把启动的流程分析一下,这也是找到问题症结的关键。

至于遇到的问题如下:

Caused by: org.apache.flume.ChannelException: Put queue for MemoryTransaction of capacity 100 full, consider committing more frequently, increasing capacity or increasing thread count
at org.apache.flume.channel.MemoryChannel$MemoryTransaction.doPut(MemoryChannel.java:84)
at org.apache.flume.channel.BasicTransactionSemantics.put(BasicTransactionSemantics.java:93)
at org.apache.flume.channel.BasicChannelSemantics.put(BasicChannelSemantics.java:80)
at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:189)

 

从异常上大致可以看出是,MemoryTransaction的容量满了,可是容量满了?然后呢。。我们开始根据代码分析。

上一篇文章中http://www.cnblogs.com/aquariusm/p/6118976.html我们分析了flume配置加载的基础流程核心就是:flumeConfiguration.getConfiguration()方法。根据第一篇文章中的流程图,我们可以看到,加载好配置文件后,就开始启动各个组件了,即Application的如下代码:

  @Subscribe
  public synchronized void handleConfigurationEvent(MaterializedConfiguration conf) {
    stopAllComponents();
    startAllComponents(conf);
  }

在startAllComponents(conf)中,无非就是开始

关于flume配置加载(二)

标签:开始   top   cat   app   流程   on()   processor   sub   event   

原文地址:http://www.cnblogs.com/aquariusm/p/6146086.html

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