flume 参考文档 (四)

Flume Sinks

    

 

1、Flume’s Collector Tier Event Sinks

collectorSink( "fsdir","fsfileprefix",rollmillis)

collectorSink,数据通过collector汇聚之后发送到hdfs, fsdir 是hdfs目录,fsfileprefix为文件前缀码

    

2、Flume’s Agent Tier Event Sinks

agentSink[("machine"[,port])]

Defaults to agentE2ESink,如果省略,machine参数,默认使用flume.collector.event.host与flume.collector.event.port作为默认collecotr(以下同此)

agentE2ESink[("machine"[,port])]

执着的agent,如果agent发送event没有收到collector成功写入的状态码,该event将被agent重复发送,直到接到成功写入的状态码

agentDFOSink[("machine" [,port])]

本地热备agent,agent发现collector节点故障后,不断检查collector的存活状态以便重新发送event,在此间产生的数据将缓存到本地磁盘中

agentBESink[("machine"[,port])]

不负责的agent,如果collector故障,将不做任何处理,它发送的数据也将被直接丢弃

agentE2EChain("m1[:_p1_]" [,"m2[:_p2_]"[,…]])

指定多个collector提高可用性。 当向主collector发送event失效后,转向第二个collector发送,当所有的collector失败后,它会非常执着的再来一遍...

agentDFOChain("m1[:_p1_]"[, "m2[:_p2_]"[,…]])

同上,当向所有的collector发送事件失效后,他会将event缓存到本地磁盘,并检查collector状态,尝试重新发送

agentBEChain("m1[:_p1_]"[, "m2[:_p2_]"[,…]])

同上,当向所有的collector发送事件失效后,他会将event丢弃

autoE2EChain

无需指定collector, 由master协调管理event的流向

autoDFOChain

同上

autoBEChain

同上

   

3、Flume’s Logical Sinks

logicalSink("logicalnode")

 

   

4、Flume’s Basic Sinks

在不使用collector收集event的情况下,可将source直接发向basic sinks

null

null

console[("formatter")]

转发到控制台

text("txtfile" [,"formatter"])

转发到文本文件

seqfile("filename")

转发到seqfile

dfs("hdfspath")

转发到hdfs

customdfs("hdfspath"[, "format"])

自定义格式dfs

+escapedCustomDfs("hdfspath", "file", "format")

 

rpcSink("host"[, port])

Rpc框架

syslogTcp("host"[,port])

发向网络地址

irc("host",port, "nick", "chan")

 

posted on 2011-05-18 21:17  张淼  阅读(5549)  评论(0编辑  收藏  举报