xuyaxiu 发表于 2015-9-16 13:35:40

flume 参考文档 (三)

  Flume Source
  
  
  1、Flume’s Tiered Event Sources
  collectorSource[(port)]
  Collector source,监听端口汇聚数据
  autoCollectorSource
  通过master协调物理节点自动汇聚数据
  logicalSource
  逻辑source,由master分配端口并监听rpcSink
  
  
  
  2、Flume’s Basic Sources
  null
  console
  监听用户编辑历史和快捷键输入,只在node_nowatch模式下可用
  stdin
  监听标准输入,只在node_nowatch模式下可用,每行将作为一个event source
  rpcSource(port)
  由rpc框架(thrift/avro)监听tcp端口
  text("filename")
  一次性读取一个文本,每行为一个event
  tail("filename"[, startFromEnd=false])
  每行为一个event。监听文件尾部的追加行,如果startFromEnd为true,tail将从文件尾读取,如果为false,tail将从文件开始读取全部数据
  multitail("filename"[, file2 [,file3… ] ])
  同上,同时监听多个文件的末尾
  tailDir("dirname"[, fileregex=".*"[, startFromEnd=false[, recurseDepth=0]]])
  监听目录中的文件末尾,使用正则去选定需要监听的文件(不包含目录),recurseDepth为递归监听其下子目录的深度
  seqfile("filename")
  监听hdfs的sequencefile,全路径
  syslogUdp(port)
  监听Udp端口
  syslogTcp(port)
  监听Tcp端口
  syslogTcp1(port)
  只监听Tcp端口的一个链接
  execPeriodic("cmdline", ms)
  周期执行指令,监听指令的输出,整个输出都被作为一个event
  execStream("cmdline")
  执行指令,监听指令的输出,输出的每一行被作为一个event
  exec("cmdline"[, aggregate=false[,restart=false[,period=0]]])
  执行指令,监听指令的输出,aggregate如果为true,整个输出作为一个event如果为false,则每行作为一个event。如果restart为true,则按period为周期重新运行
  synth(msgCount,msgSize)
  随即产生字符串event,msgCount为产生数量,msgSize为串长度
  synthrndsize(msgCount,minSize,maxSize)
  同上,minSize – maxSize
  nonlsynth(msgCount,msgSize)
  asciisynth(msgCount,msgSize)
  Ascii码字符
  twitter("username","pw"[,"url"])
  尼玛twitter的插件啊
  irc("server",port, "nick","chan")
  scribe[(+port)]
  Scribe插件
  report[(periodMillis)]
  生成所有physical node报告为事件源
页: [1]
查看完整版本: flume 参考文档 (三)