[
https://issues.apache.org/jira/browse/FLUME-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Kholodilov closed FLUME-1742.
------------------------------------
> 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
> Fix For: v1.3.0
>
>
> 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