随笔分类 -  Flume

apache flume
摘要:啊,AvroSink要复杂好多:《好吧,先确定主要问题:AvroSink为啥这么多代码?有必要吗?它都有哪些逻辑需要实现? 你看,avro-rpc-quickstart里是这么建client,然后进行RPC的 NettyTransceiver client = new Netty... 阅读全文
posted @ 2014-03-23 10:24 devos 阅读(4159) 评论(0) 推荐(0)
摘要:问题 : Avro Source提供了怎么样RPC服务,是怎么提供的?问题 1.1 Flume Source是如何启动一个Netty Server来提供RPC服务。由GitHub上avro-rpc-quickstart知道可以通过下面这种方式启动一个NettyServer,来提供特定的RPC。那么F... 阅读全文
posted @ 2014-03-22 18:22 devos 阅读(6788) 评论(0) 推荐(0)
摘要:org.apache.flume.channel.BasicTransactionSemanticsAn implementation of basic Transaction semantics designed to work in concert with BasicChannelSemantics to simplify creation of robust Channel implementations. This class ensures that each transaction implementation method is called only while the tr 阅读全文
posted @ 2013-11-24 21:34 devos 阅读(616) 评论(0) 推荐(0)
摘要:public class MemoryChannel extends BasicChannelSemanticspublic abstract class BasicChannelSemantics extends AbstractChannelpublic abstract class AbstractChannel implements Channel, LifecycleAware, ConfigurableAbstractChannel只在实现了LifecycleAware,NamedComponent和Configurable中的一些接口,除了对部分方法进行了同步,没什么特殊。Bas 阅读全文
posted @ 2013-11-24 16:57 devos 阅读(522) 评论(0) 推荐(0)
摘要:首先要搞清楚的问题是:Flume中的事务用来干嘛?Flume中的事务用来保证消息的可靠传递。当使用继承自BasicChannelSemantics的Channel时,Flume强制在操作Channel时采用特定的程序结构,并且强制channel实现特定的方法以使得Channel本身可以应对存入或取出失败的情况,并且使得channel的使用者有可能根据操作是否成功采取适当的方法。Channel在Flume的架构中主要起了缓存的作用,当使用FileChannel时,它是一个持久化的缓存。若把Channel类比为数据库,而把Flume的事务类比为数据库事务,那么Flume通过事务来确保Source和 阅读全文
posted @ 2013-11-24 15:48 devos 阅读(1723) 评论(0) 推荐(0)
摘要:Flume有三个组件:Source、Channel 和 Sink。在源码中对应同名的三个接口。When a Flume source receives an event, it stores it into one or more channels. The channel is a passive store that keeps the event until it’s consumed by a Flume sink.public interface Source extends LifecycleAware, NamedComponent { /** * Specifies wh... 阅读全文
posted @ 2013-11-23 16:14 devos 阅读(550) 评论(0) 推荐(0)