Event Deserializers
以下事件反序列化器与Flume一起发运。
1、LINE这种反序列化器将输入的文件的每行生成一个event。
Property NameDefaultDescriptiondeserializer.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 NameDefaultDescriptiondeserializer.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 NameDefaultDescriptiondeserializer–The FQCN of this class:org.apache.flume.sink.solr.morphline.BlobDeserializer$Builderdeserializer.maxBlobLength100000000The maximum number of bytes to read and buffer for a given request