lakers009 发表于 2017-12-24 21:19:53

Apache Flume入门指南[翻译自官方文档]

# list the sources, sinks and channels in the agent  
agent_foo.sources = avro-AppSrv-source1
  
agent_foo.sinks = hdfs-Cluster1-sink1 avro-forward-sink2
  
agent_foo.channels = mem-channel-1 file-channel-2
  

  
# set channels for source
  
agent_foo.sources.avro-AppSrv-source1.channels = mem-channel-1 file-channel-2
  

  
# set channel for sinks
  
agent_foo.sinks.hdfs-Cluster1-sink1.channel = mem-channel-1
  
agent_foo.sinks.avro-forward-sink2.channel = file-channel-2
  

  
# channel selector configuration
  
agent_foo.sources.avro-AppSrv-source1.selector.type = multiplexing
  
agent_foo.sources.avro-AppSrv-source1.selector.header = State
  
agent_foo.sources.avro-AppSrv-source1.selector.mapping.CA = mem-channel-1
  
agent_foo.sources.avro-AppSrv-source1.selector.mapping.AZ = file-channel-2
  
agent_foo.sources.avro-AppSrv-source1.selector.mapping.NY = mem-channel-1 file-channel-2
  
agent_foo.sources.avro-AppSrv-source1.selector.default = mem-channel-1
  

  
还有一个optional的例子
  
agent_foo.sources.avro-AppSrv-source1.selector.optional.CA = mem-channel-1 file-channel-2
  
页: [1]
查看完整版本: Apache Flume入门指南[翻译自官方文档]