Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Flume >> mail # user >> About custom source


Copy link to this message
-
Re: About custom source
I opened https://issues.apache.org/jira/browse/FLUME-1422 related to this.

- Patrick

On Thu, Aug 2, 2012 at 8:28 AM, Jarek Jarcec Cecho <[EMAIL PROTECTED]> wrote:
> Hi Guys,
> could you create a JIRA for that?
>
> Jarcec
>
> On Thu, Aug 02, 2012 at 01:43:24PM +0900, バーチャル クリストファー wrote:
>> I noticed this as well. It's a mistake in the documentation.
>>
>> The class signature should be:
>>
>> public class BarSource extends AbstractSource implements
>> Configurable, PollableSource
>>
>> (where PollableSource is org.apache.flume.PollableSource)
>>
>> Chris.
>>
>>
>> On 2012/08/02 13:35, 荆棘鸟 wrote:
>> >hello people:
>> >  I am doing the custom source.But I was found a problem about
>> >Flume Developer Guide.At the Guide has a explain that is
>> >"
>> >public  class  BarSource  extends  AbstractSource  implements  Configurable,  EventDrivenSource{
>> >   @Override
>> >   public  void  configure(Context  context)  {
>> >     some_Param  =  context.get("some_param",  String.class);
>> >     // process some_param …
>> >   }
>> >   @Override
>> >   public  void  start()  {
>> >     // initialize the connection to bar client ..
>> >   }
>> >   @Override
>> >   public  void  stop  ()  {
>> >     // cleanup and disconnect from bar client ..
>> >   }
>> >   @Override
>> >   public  Status  process()  throws  EventDeliveryException  {
>> >     try  {
>> >       // receive new data
>> >       Event  e  =  get_some_data();
>> >       // store the event to underlying channels(s)
>> >       getChannelProcessor().processEvent(e)
>> >     }  catch  (ChannelException  ex)  {
>> >       return  Status.BACKOFF;
>> >     }
>> >     return  Status.READY;
>> >   }
>> >}
>> >About the process() method in this configuration is a inheriting method.But I didn't fount its father class.I want to know whether living the father class .
>> >
>>