内置组件

提示

基本上你能想到的常见的数据来源(source)与目的地(sink)Flume都帮我们实现了,下表是Flume自带的一些组件和它们的别名,这个别名在实际使用的时候非常方便。看一遍差不多也就记住了,记不住也没关系,知道大概有哪些就行了。

提示

别名不区分大小写。


组件接口

别名

实现类

org.apache.flume.Channel

memory

org.apache.flume.channel.MemoryChannel

org.apache.flume.Channel

jdbc

org.apache.flume.channel.jdbc.JdbcChannel

org.apache.flume.Channel

file

org.apache.flume.channel.file.FileChannel

org.apache.flume.Channel



org.apache.flume.channel.PseudoTxnMemoryChannel

org.apache.flume.Channel



org.example.MyChannel

org.apache.flume.Source

avro

org.apache.flume.source.AvroSource

org.apache.flume.Source

netcat

org.apache.flume.source.NetcatSource

org.apache.flume.Source

seq

org.apache.flume.source.SequenceGeneratorSource

org.apache.flume.Source

exec

org.apache.flume.source.ExecSource

org.apache.flume.Source

syslogtcp

org.apache.flume.source.SyslogTcpSource

org.apache.flume.Source

multiport_syslogtcp

org.apache.flume.source.MultiportSyslogTCPSource

org.apache.flume.Source

syslogudp

org.apache.flume.source.SyslogUDPSource

org.apache.flume.Source

spooldir

org.apache.flume.source.SpoolDirectorySource

org.apache.flume.Source

http

org.apache.flume.source.http.HTTPSource

org.apache.flume.Source

thrift

org.apache.flume.source.ThriftSource

org.apache.flume.Source

jms

org.apache.flume.source.jms.JMSSource

org.apache.flume.Source



org.apache.flume.source.avroLegacy.AvroLegacySource

org.apache.flume.Source



org.apache.flume.source.thriftLegacy.ThriftLegacySource

org.apache.flume.Source



org.example.MySource

org.apache.flume.Sink

null

org.apache.flume.sink.NullSink

org.apache.flume.Sink

logger

org.apache.flume.sink.LoggerSink

org.apache.flume.Sink

avro

org.apache.flume.sink.AvroSink

org.apache.flume.Sink

hdfs

org.apache.flume.sink.hdfs.HDFSEventSink

org.apache.flume.Sink

hbase

org.apache.flume.sink.hbase.HBaseSink

org.apache.flume.Sink

asynchbase

org.apache.flume.sink.hbase.AsyncHBaseSink

org.apache.flume.Sink

elasticsearch

org.apache.flume.sink.elasticsearch.ElasticSearchSink

org.apache.flume.Sink

file_roll

org.apache.flume.sink.RollingFileSink

org.apache.flume.Sink

irc

org.apache.flume.sink.irc.IRCSink

org.apache.flume.Sink

thrift

org.apache.flume.sink.ThriftSink

org.apache.flume.Sink



org.example.MySink

org.apache.flume.ChannelSelector

replicating

org.apache.flume.channel.ReplicatingChannelSelector

org.apache.flume.ChannelSelector

multiplexing

org.apache.flume.channel.MultiplexingChannelSelector

org.apache.flume.ChannelSelector



org.example.MyChannelSelector

org.apache.flume.SinkProcessor

default

org.apache.flume.sink.DefaultSinkProcessor

org.apache.flume.SinkProcessor

failover

org.apache.flume.sink.FailoverSinkProcessor

org.apache.flume.SinkProcessor

load_balance

org.apache.flume.sink.LoadBalancingSinkProcessor

org.apache.flume.SinkProcessor



org.apache.flume.interceptor.Interceptor

timestamp

org.apache.flume.interceptor.TimestampInterceptor$Builder

org.apache.flume.interceptor.Interceptor

host

org.apache.flume.interceptor.HostInterceptor$Builder

org.apache.flume.interceptor.Interceptor

static

org.apache.flume.interceptor.StaticInterceptor$Builder

org.apache.flume.interceptor.Interceptor

regex_filter

org.apache.flume.interceptor.RegexFilteringInterceptor$Builder

org.apache.flume.interceptor.Interceptor

regex_extractor

org.apache.flume.interceptor.RegexFilteringInterceptor$Builder

org.apache.flume.channel.file.encryption.KeyProvider$Builder

jceksfile

org.apache.flume.channel.file.encryption.JCEFileKeyProvider

org.apache.flume.channel.file.encryption.KeyProvider$Builder



org.example.MyKeyProvider

org.apache.flume.channel.file.encryption.CipherProvider

aesctrnopadding

org.apache.flume.channel.file.encryption.AESCTRNoPaddingProvider

org.apache.flume.channel.file.encryption.CipherProvider



org.example.MyCipherProvider

org.apache.flume.serialization.EventSerializer$Builder

text

org.apache.flume.serialization.BodyTextEventSerializer$Builder

org.apache.flume.serialization.EventSerializer$Builder

avro_event

org.apache.flume.serialization.FlumeEventAvroEventSerializer$Builder

org.apache.flume.serialization.EventSerializer$Builder



org.example.MyEventSerializer$Builder