How to use flume for uploading zip files to hdfs s

2019-06-04 23:35发布

I am new to flume.My flume agent having source as http server,from where it getting zip files(compressed xml files) on regular interval.This zip files are very small (less than 10 mb) and i want to put the zip files extracted into the hdfs sink.Please share some idea how to do this.Do i have to go for a custom interceptor.

1条回答
Emotional °昔
2楼-- · 2019-06-04 23:49

Flume will try to read your files line by line, except if you configure a specific deserializer. A deserializer lets you control how the file is parsed and split into events. You could of course follow the example of the blob deserizalizer, which is designed for PDFs and such, but I understand that you actually want to unpack them and then read them line by line. In that case you would need to write a custom deserializer which reads Zip and writes line by line events.

Here's the reference in the documentation:

https://flume.apache.org/FlumeUserGuide.html#event-deserializers

查看更多
登录 后发表回答