ITeye博客

Flume源代码解读五

xcly · 2012-03-15 17:01 · Hadoop · 开源软件 · Markdown

[ xcly原创于iteye,见http://xcly.iteye.com ]

 

本节介绍Flume存储配置项的工作方式,Flume支持zookeeper和memory两种方式。

 

     FlumeMaster启动时,创建ConfigStore。 如果为zookeeper方式,还初始化ZooKeeperService。对ConfigStore的使用通过ConfigurationManager来使用。

 

     Flume配置数据的存储定义了ConfigStore这个抽象类,memory的存储实现为MemoryBackedConfigStore,实现比较简单,Map<String, FlumeConfigData> cfgs直接存在内存map结构中。 

 

    ZooKeeperConfigStore和ZKClient负责和zookeeper服务器通信,编码配置,解码配置。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。