You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by Robert Heise <ro...@yahoo.com> on 2013/08/14 22:58:05 UTC
Architectural questions
Hello,
As I continue to ramp up using Apache Flume (v1.3.0), I have observed a few challenges and hoping somebody who has more experience can shed some light.
1. Establishing a data pipeline is trivial, what I have noticed is that any exceptions caught from the channel->sink operation invoke what appears to be a repeating cycle of exceptions. As an example, any events which cause an exception (java stacktrace) put the agent into a tailspin. There are no tools for managing the pipeline to identify culprit events/files, stopping, purging the channel, introspecting the pipeline etc. The best course of action is to purge everything under file-channel and restart the agent. I've read several posts posturing that using regex interceptors could be a potential fix, but it is almost impossible to predict, in a production environment, what exceptions are going to occur. In my opinion, there has to be a declarative manner to move bad events out of the channel to a "dead-letter-queue" or equivalent.
2. I was hoping that the Spooling Directory Source would help us capture file metadata, but nothing ever appears in the default .flumespool trackerDir option?
3. Maybe my use case is not the right fit for Flume, but my largest design constraint is that we deal with files, everything we do is based on files. I was hoping that the spooldir and batch control options would provide an intuitive way to process files incoming to a spooldirectory, and ultimately land that same data to HDFS. However, a file with 470,000 lines is creating over 52MM events and because the tooling is week, I have no visibility into why that many events are being created, where the agent is in respect to completing. The data flow architecture is perfect, but maybe Flume is best used for logs, tailing of files, etc, not necessarily processing files?
Thanks
Re: Architectural questions
Posted by Harsh J <ha...@cloudera.com>.
Hello Pankaj,
All changes for 1.3.1 release (over 1.3.0) are listed on the release
notes page: http://flume.apache.org/releases/1.3.1.html
On Sun, Aug 18, 2013 at 11:20 AM, Pankaj Gupta <pa...@brightroll.com> wrote:
> Hi Hari,
>
> Just curios about the performance improvement, can you provide the number of
> the JIRA that improves performance in 1.3.1?
>
> Thanks,
> Pankaj
>
>
> On Wed, Aug 14, 2013 at 2:23 PM, Hari Shreedharan
> <hs...@cloudera.com> wrote:
>>
>> Flume v1.3.0 had a major performance issue which is why 1.3.1 was released
>> immediately after. The current stable release is 1.4.0 - so you should use
>> that.
>>
>> 1. Can you detail this point? Channel to Sink should really not have any
>> exceptions - if the sink or a plugin the sink is using is causing rollbacks,
>> then that should handle the failure cases/drop events etc. The channel is
>> pretty much a passive component just like a queue - "bad events" are events
>> sinks cannot handle due to some reason. The logic of handling this should be
>> in the sink itself.
>>
>> 2. Currently that is not an option, but if you need it, chances are there
>> are others who do too. Explain your use-case in a jira. Remember, Flume is
>> not a file streaming system, it is an event streaming one, so each file is
>> still converted into events by Flume.
>>
>> 3. If you think the current deserializers don't fit your use-case, you can
>> easily write your own and drop it in.
>>
>>
>> Thanks,
>> Hari
>>
>> On Wednesday, August 14, 2013 at 1:58 PM, Robert Heise wrote:
>>
>> Hello,
>>
>> As I continue to ramp up using Apache Flume (v1.3.0), I have observed a
>> few challenges and hoping somebody who has more experience can shed some
>> light.
>>
>> 1. Establishing a data pipeline is trivial, what I have noticed is that
>> any exceptions caught from the channel->sink operation invoke what appears
>> to be a repeating cycle of exceptions. As an example, any events which
>> cause an exception (java stacktrace) put the agent into a tailspin. There
>> are no tools for managing the pipeline to identify culprit events/files,
>> stopping, purging the channel, introspecting the pipeline etc. The best
>> course of action is to purge everything under file-channel and restart the
>> agent. I've read several posts posturing that using regex interceptors
>> could be a potential fix, but it is almost impossible to predict, in a
>> production environment, what exceptions are going to occur. In my opinion,
>> there has to be a declarative manner to move bad events out of the channel
>> to a "dead-letter-queue" or equivalent.
>> 2. I was hoping that the Spooling Directory Source would help us capture
>> file metadata, but nothing ever appears in the default .flumespool
>> trackerDir option?
>> 3. Maybe my use case is not the right fit for Flume, but my largest design
>> constraint is that we deal with files, everything we do is based on files.
>> I was hoping that the spooldir and batch control options would provide an
>> intuitive way to process files incoming to a spooldirectory, and ultimately
>> land that same data to HDFS. However, a file with 470,000 lines is creating
>> over 52MM events and because the tooling is week, I have no visibility into
>> why that many events are being created, where the agent is in respect to
>> completing. The data flow architecture is perfect, but maybe Flume is best
>> used for logs, tailing of files, etc, not necessarily processing files?
>>
>> Thanks
>>
>>
>
>
>
> --
>
>
> P | (415) 677-9222 ext. 205 F | (415) 677-0895 | pankaj@brightroll.com
>
> Pankaj Gupta | Software Engineer
>
> BrightRoll, Inc. | Smart Video Advertising | www.brightroll.com
>
>
> United States | Canada | United Kingdom | Germany
>
>
> We're hiring!
--
Harsh J
Re: Architectural questions
Posted by Pankaj Gupta <pa...@brightroll.com>.
Hi Hari,
Just curios about the performance improvement, can you provide the number
of the JIRA that improves performance in 1.3.1?
Thanks,
Pankaj
On Wed, Aug 14, 2013 at 2:23 PM, Hari Shreedharan <hshreedharan@cloudera.com
> wrote:
> Flume v1.3.0 had a major performance issue which is why 1.3.1 was
> released immediately after. The current stable release is 1.4.0 - so you
> should use that.
>
> 1. Can you detail this point? Channel to Sink should really not have any
> exceptions - if the sink or a plugin the sink is using is causing
> rollbacks, then that should handle the failure cases/drop events etc. The
> channel is pretty much a passive component just like a queue - "bad events"
> are events sinks cannot handle due to some reason. The logic of handling
> this should be in the sink itself.
>
> 2. Currently that is not an option, but if you need it, chances are there
> are others who do too. Explain your use-case in a jira. Remember, Flume is
> not a file streaming system, it is an event streaming one, so each file is
> still converted into events by Flume.
>
> 3. If you think the current deserializers don't fit your use-case, you can
> easily write your own and drop it in.
>
>
> Thanks,
> Hari
>
> On Wednesday, August 14, 2013 at 1:58 PM, Robert Heise wrote:
>
> Hello,
>
> As I continue to ramp up using Apache Flume (v1.3.0), I have observed a
> few challenges and hoping somebody who has more experience can shed some
> light.
>
> 1. Establishing a data pipeline is trivial, what I have noticed is that
> any exceptions caught from the channel->sink operation invoke what appears
> to be a repeating cycle of exceptions. As an example, any events which
> cause an exception (java stacktrace) put the agent into a tailspin. There
> are no tools for managing the pipeline to identify culprit events/files,
> stopping, purging the channel, introspecting the pipeline etc. The best
> course of action is to purge everything under file-channel and restart the
> agent. I've read several posts posturing that using regex interceptors
> could be a potential fix, but it is almost impossible to predict, in a
> production environment, what exceptions are going to occur. In my opinion,
> there has to be a declarative manner to move bad events out of the channel
> to a "dead-letter-queue" or equivalent.
> 2. I was hoping that the Spooling Directory Source would help us capture
> file metadata, but nothing ever appears in the default .flumespool
> trackerDir option?
> 3. Maybe my use case is not the right fit for Flume, but my largest design
> constraint is that we deal with files, everything we do is based on files.
> I was hoping that the spooldir and batch control options would provide an
> intuitive way to process files incoming to a spooldirectory, and ultimately
> land that same data to HDFS. However, a file with 470,000 lines is
> creating over 52MM events and because the tooling is week, I have no
> visibility into why that many events are being created, where the agent is
> in respect to completing. The data flow architecture is perfect, but maybe
> Flume is best used for logs, tailing of files, etc, not necessarily
> processing files?
>
> Thanks
>
>
>
--
*P* | (415) 677-9222 ext. 205 *F *| (415) 677-0895 | pankaj@brightroll.com
Pankaj Gupta | Software Engineer
*BrightRoll, Inc. *| Smart Video Advertising | www.brightroll.com
United States | Canada | United Kingdom | Germany
We're hiring<http://newton.newtonsoftware.com/career/CareerHome.action?clientId=8a42a12b3580e2060135837631485aa7>
!
Re: Architectural questions
Posted by Hari Shreedharan <hs...@cloudera.com>.
Flume v1.3.0 had a major performance issue which is why 1.3.1 was released immediately after. The current stable release is 1.4.0 - so you should use that.
1. Can you detail this point? Channel to Sink should really not have any exceptions - if the sink or a plugin the sink is using is causing rollbacks, then that should handle the failure cases/drop events etc. The channel is pretty much a passive component just like a queue - "bad events" are events sinks cannot handle due to some reason. The logic of handling this should be in the sink itself.
2. Currently that is not an option, but if you need it, chances are there are others who do too. Explain your use-case in a jira. Remember, Flume is not a file streaming system, it is an event streaming one, so each file is still converted into events by Flume.
3. If you think the current deserializers don't fit your use-case, you can easily write your own and drop it in.
Thanks,
Hari
On Wednesday, August 14, 2013 at 1:58 PM, Robert Heise wrote:
> Hello,
>
> As I continue to ramp up using Apache Flume (v1.3.0), I have observed a few challenges and hoping somebody who has more experience can shed some light.
>
> 1. Establishing a data pipeline is trivial, what I have noticed is that any exceptions caught from the channel->sink operation invoke what appears to be a repeating cycle of exceptions. As an example, any events which cause an exception (java stacktrace) put the agent into a tailspin. There are no tools for managing the pipeline to identify culprit events/files, stopping, purging the channel, introspecting the pipeline etc. The best course of action is to purge everything under file-channel and restart the agent. I've read several posts posturing that using regex interceptors could be a potential fix, but it is almost impossible to predict, in a production environment, what exceptions are going to occur. In my opinion, there has to be a declarative manner to move bad events out of the channel to a "dead-letter-queue" or equivalent.
> 2. I was hoping that the Spooling Directory Source would help us capture file metadata, but nothing ever appears in the default .flumespool trackerDir option?
> 3. Maybe my use case is not the right fit for Flume, but my largest design constraint is that we deal with files, everything we do is based on files. I was hoping that the spooldir and batch control options would provide an intuitive way to process files incoming to a spooldirectory, and ultimately land that same data to HDFS. However, a file with 470,000 lines is creating over 52MM events and because the tooling is week, I have no visibility into why that many events are being created, where the agent is in respect to completing. The data flow architecture is perfect, but maybe Flume is best used for logs, tailing of files, etc, not necessarily processing files?
>
> Thanks
>
Re: Events being cut by flume
Posted by Israel Ekpo <is...@aicer.org>.
The default value for the available memory specified in
$FLUME_HOME/bin/flume-ng is very small (20MB)
So, in your $FLUME_HOME/conf/flume-env.sh file
Try increasing your Java memory to a higher number (at most 50% of the
available RAM)
JAVA_OPTS="-Xms4096m -Xmx4096m -XX:MaxPermSize=4096m"
Then, in your agent configuration file:
Increase the maximum number of lines per event to a much higher number
(like 5000).
Also change the output encoding to UTF-8
Let's make sure that the input encoding matches the encoding of the
original event. This can cause problems if it is not the right one.
Let's see if these changes make a difference.
*Author and Instructor for the Upcoming Book and Lecture Series*
*Massive Log Data Aggregation, Processing, Searching and Visualization with
Open Source Software*
*http://massivelogdata.com*
On 27 August 2013 11:13, ZORAIDA HIDALGO SANCHEZ <zo...@tid.es> wrote:
> Hi Israel,
>
> thanks for your response. We already checked this, doing :set list with
> vi editor our events look like this:
>
> "line1field1";"line1field2";"line1fieldN"*$*
> "lineNfield1";"lineNfield2";"lineNfieldN"*$*
>
> There are not event delimiters*($)* between fields of an event.
> I have tried forcing the encoding(because I believe this files, that are
> generated by our customer, are converted from ascii to utf-8 by BOM and
> they could contain characters with more bytes that the expected one):
>
> *agent.sources.rpb.inputCharset = UTF-16*
> *agent.sources.rpb.deserializer.maxLineLength = 250*
> *agent.sources.rpb.deserializer.outputCharset = UTF-16*
>
> but if i use a *maxLineLenght* of this size(250) then lot of events are
> truncated(event the max characters per line are 250):
> *13/08/27 17:03:34 WARN serialization.LineDeserializer: Line length
> exceeds max (250), truncating line!*
>
> if I take a look into the generated file, there are unrecognized
> chacarters: �� and events have been cut in a random way(there are lines
> with only 3 characters).
>
> I have tried increasing the maxLineLenght parameter but I end getting a
> java heap space exception :(
>
> Again, thanks. Any help will be very appreciated.
>
>
>
> De: Israel Ekpo <is...@aicer.org>
>
> Responder a: Flume User List <us...@flume.apache.org>
> Fecha: martes, 27 de agosto de 2013 16:29
>
> Para: Flume User List <us...@flume.apache.org>
> Asunto: Re: Events being cut by flume
>
> Hello Zoraida,
>
> What sources are you events coming from?
>
> I have a feeling they are coming from SpoolingDirectory and the events
> contains newline characters (even delimiter).
>
> If this is the case, you are going to see the events split up whenever
> the parser encounters the delimiter.
>
>
> *Author and Instructor for the Upcoming Book and Lecture Series*
> *Massive Log Data Aggregation, Processing, Searching and Visualization
> with Open Source Software*
> *http://massivelogdata.com*
>
>
> On 27 August 2013 06:20, ZORAIDA HIDALGO SANCHEZ <zo...@tid.es> wrote:
>
>>
>> Hello,
>>
>> I am having some weird problem while processing events coming from a
>> file with this format:
>> UTF-8 Unicode (with BOM) English text, with CRLF line terminators
>>
>> Some of the events in the file contain this text: "Marés". While some
>> events are sent correctly without begin cut by flume, there are others that
>> arrive incomplete. And even more, the process of sending more events (once
>> one event has been cut) stops. We end with incomplete files on HDFS. We
>> have isolate the problem: trying with roll file sink instead of HDFS ,
>> removing all the interceptors, etc. However, we still have the same
>> problem. Apparently, the troublesome event does not have any hide weird
>> character and files are generated automatically so we would expect that if
>> some malformed input comes from one event, it would come for the others
>> too.
>>
>> We really appreciate any hint that you could give us.
>>
>> Thanks.
>>
>>
>>
>> ------------------------------
>>
>> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar
>> nuestra política de envío y recepción de correo electrónico en el enlace
>> situado más abajo.
>> This message is intended exclusively for its addressee. We only send and
>> receive email on the basis of the terms set out at:
>> http://www.tid.es/ES/PAGINAS/disclaimer.aspx
>>
>
>
> ------------------------------
>
> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar
> nuestra política de envío y recepción de correo electrónico en el enlace
> situado más abajo.
> This message is intended exclusively for its addressee. We only send and
> receive email on the basis of the terms set out at:
> http://www.tid.es/ES/PAGINAS/disclaimer.aspx
>
Re: Events being cut by flume
Posted by Israel Ekpo <is...@aicer.org>.
Hello Zoraida,
What sources are you events coming from?
I have a feeling they are coming from SpoolingDirectory and the events
contains newline characters (even delimiter).
If this is the case, you are going to see the events split up whenever the
parser encounters the delimiter.
*Author and Instructor for the Upcoming Book and Lecture Series*
*Massive Log Data Aggregation, Processing, Searching and Visualization with
Open Source Software*
*http://massivelogdata.com*
On 27 August 2013 06:20, ZORAIDA HIDALGO SANCHEZ <zo...@tid.es> wrote:
>
> Hello,
>
> I am having some weird problem while processing events coming from a
> file with this format:
> UTF-8 Unicode (with BOM) English text, with CRLF line terminators
>
> Some of the events in the file contain this text: "Marés". While some
> events are sent correctly without begin cut by flume, there are others that
> arrive incomplete. And even more, the process of sending more events (once
> one event has been cut) stops. We end with incomplete files on HDFS. We
> have isolate the problem: trying with roll file sink instead of HDFS ,
> removing all the interceptors, etc. However, we still have the same
> problem. Apparently, the troublesome event does not have any hide weird
> character and files are generated automatically so we would expect that if
> some malformed input comes from one event, it would come for the others
> too.
>
> We really appreciate any hint that you could give us.
>
> Thanks.
>
>
>
> ------------------------------
>
> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar
> nuestra política de envío y recepción de correo electrónico en el enlace
> situado más abajo.
> This message is intended exclusively for its addressee. We only send and
> receive email on the basis of the terms set out at:
> http://www.tid.es/ES/PAGINAS/disclaimer.aspx
>
Re: Events being cut by flume
Posted by ZORAIDA HIDALGO SANCHEZ <zo...@tid.es>.
Hi all,
is there any example of how to create an agent with a spooldir/channel/rollfile and debug this? (programatically).
Thanks,
Zoraida.-
De: zoraida <zo...@tid.es>>
Responder a: Flume User List <us...@flume.apache.org>>
Fecha: martes, 27 de agosto de 2013 12:20
Para: Flume User List <us...@flume.apache.org>>
Asunto: Events being cut by flume
Hello,
I am having some weird problem while processing events coming from a file with this format:
UTF-8 Unicode (with BOM) English text, with CRLF line terminators
Some of the events in the file contain this text: "Marés". While some events are sent correctly without begin cut by flume, there are others that arrive incomplete. And even more, the process of sending more events (once one event has been cut) stops. We end with incomplete files on HDFS. We have isolate the problem: trying with roll file sink instead of HDFS , removing all the interceptors, etc. However, we still have the same problem. Apparently, the troublesome event does not have any hide weird character and files are generated automatically so we would expect that if some malformed input comes from one event, it would come for the others too.
We really appreciate any hint that you could give us.
Thanks.
________________________________
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
________________________________
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
Events being cut by flume
Posted by ZORAIDA HIDALGO SANCHEZ <zo...@tid.es>.
Hello,
I am having some weird problem while processing events coming from a file with this format:
UTF-8 Unicode (with BOM) English text, with CRLF line terminators
Some of the events in the file contain this text: "Marés". While some events are sent correctly without begin cut by flume, there are others that arrive incomplete. And even more, the process of sending more events (once one event has been cut) stops. We end with incomplete files on HDFS. We have isolate the problem: trying with roll file sink instead of HDFS , removing all the interceptors, etc. However, we still have the same problem. Apparently, the troublesome event does not have any hide weird character and files are generated automatically so we would expect that if some malformed input comes from one event, it would come for the others too.
We really appreciate any hint that you could give us.
Thanks.
________________________________
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx