flume学习09---Event Deserializers

Event Deserializers

以下事件反序列化器与Flume一起发运。

1、LINE

这种反序列化器将输入的文件的每行生成一个event。

Property NameDefaultDescription
deserializer.maxLineLength2048Maximum number of characters to include in a single event. If a line exceeds this length, it is truncated, and the remaining characters on the line will appear in a subsequent event.
deserializer.outputCharsetUTF-8Charset to use for encoding events put into the channel.

2、AVRO

这个反序列化器能够读取Avro container file,并且在文件中为每个Avro记录生成一个event。 每个event都使用一个头部注释, 指示该schema已经使用。 事件的主体是二进制Avro记录数据,不包括schema 或容器文件元素的其余部分。

请注意,如果 spool directory source 必须重试将其中一个事件放到某个通道(例如,因为通道已满),那么它将重置并从最近的Avro容器文件同步点重试。 要在此类故障情况下减少潜在的事件重复,请在Avro输入文件中更频繁地写入同步标记。

Property NameDefaultDescription
deserializer.schemaTypeHASHHow the schema is represented. By default, or when the value HASH is specified, the Avro schema is hashed and the hash is stored in every event in the event header “flume.avro.schema.hash”. If LITERAL is specified, the JSON-encoded schema itself is stored in every event in the event header “flume.avro.schema.literal”. Using LITERAL mode is relatively inefficient compared to HASH mode.

3、BlobDeserializer

这个deserialzer每个事件读取一个二进制大对象(BLOB),通常每个文件一个BLOB。 例如PDF或JPG文件。 请注意,此方法不适用于非常大的对象,因为整个BLOB都缓存在RAM中。

Property NameDefaultDescription
deserializerThe FQCN of this class:org.apache.flume.sink.solr.morphline.BlobDeserializer$Builder
deserializer.maxBlobLength100000000The maximum number of bytes to read and buffer for a given request
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值