flume-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From terrey shih <terreys...@gmail.com>
Subject Re: does flume send event in a multi threaded manner ?
Date Thu, 09 Oct 2014 18:00:47 GMT
thanks Har. How long does it wait for return or throw the excepion ?

thx

On Thu, Oct 9, 2014 at 10:51 AM, Hari Shreedharan <hshreedharan@cloudera.com
> wrote:

> The method does block, but it would not block forever. It will either
> return or throw.
>
> Thanks,
> Hari
>
>
> On Thu, Oct 9, 2014 at 10:38 AM, terrey shih <terreyshih@gmail.com> wrote:
>
>>   Hi
>>
>> Can sending an event gets blocked because something happened down at the
>> source of the other agent?
>>
>> For example, consider the following taken from the developer guide.
>>
>> public void myMethod(){
>>
>>
>> SomeDataObject data = getData()
>> Event event = EventBuilder.withBody(data);
>>
>>     // Send the event
>>     try {
>>       client.append(event);
>>     } catch (EventDeliveryException e) {
>>       // clean up and recreate the client
>>       client.close();
>>       client = null;
>>       client = RpcClientFactory.getDefaultInstance(hostname, port);
>>     }
>>
>>
>> }
>>
>> if for some reason, the event has problem sending downstream, would it
>> block myMethod from returning ?
>>
>> I know the catch block might catch the exception, but is it possible that
>> something else happens and the method just hangs and myMethod never returns
>> ?  Or is it multithreaded and does not block ?
>>
>> thx,
>> Terrey
>>
>>
>>
>>
>

Mime
View raw message