You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by 荆棘鸟 <li...@qq.com> on 2012/08/02 06:35:39 UTC
About custom source
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 .
Re: About custom source
Posted by Patrick Wendell <pw...@gmail.com>.
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 <ja...@apache.org> 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 .
>> >
>>
Re: About custom source
Posted by Jarek Jarcec Cecho <ja...@apache.org>.
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 .
> >
>
Re: About custom source
Posted by バーチャル クリストファー <bi...@infoscience.co.jp>.
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 .
>