You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Dmitry Kholodilov (JIRA)" <ji...@apache.org> on 2012/11/27 18:43:58 UTC
[jira] [Created] (FLUME-1742) Mistake in code example in Flume
Developer Guide, section "Developing custom components/Source"
Dmitry Kholodilov created FLUME-1742:
----------------------------------------
Summary: Mistake in code example in Flume Developer Guide, section "Developing custom components/Source"
Key: FLUME-1742
URL: https://issues.apache.org/jira/browse/FLUME-1742
Project: Flume
Issue Type: Story
Components: Docs
Reporter: Dmitry Kholodilov
Priority: Minor
It seems that there is a mistake in source code example here: http://flume.apache.org/FlumeDeveloperGuide.html#source
{code}
// bar source
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;
}
}
{code}
I think this class should implement interface PollableSource, not EventDrivenSource, because the former has process() method and the latter doesn't have it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira